コード例 #1
0
        public DeleteEpisodesCommandHandlerTests()
        {
            _command = new DeleteEpisodesCommand
            {
                EpisodeIds = _episodeIds
            };

            _episodeCommandDataSource = Substitute.For <IEpisodeCommandDataSource>();
            _handler = new DeleteEpisodesCommandHandler(_episodeCommandDataSource);
        }
コード例 #2
0
 public RefreshEpisodesCommandHandler(ISubscriptionQueryDataSource subscriptionQueryDataSource,
                                      ISubscriptionCommandDataSource subscriptionCommandDataSource,
                                      IEpisodeCommandDataSource episodeCommandDataSource,
                                      IUpdateEpisodesService updateEpisodesService)
 {
     _subscriptionQueryDataSource   = subscriptionQueryDataSource;
     _subscriptionCommandDataSource = subscriptionCommandDataSource;
     _episodeCommandDataSource      = episodeCommandDataSource;
     _updateEpisodesService         = updateEpisodesService;
 }
        public RefreshEpisodesCommandHandlerTests()
        {
            _subscriptionQueryDataSource   = Substitute.For <ISubscriptionQueryDataSource>();
            _subscriptionCommandDataSource = Substitute.For <ISubscriptionCommandDataSource>();
            _episodeCommandDataSource      = Substitute.For <IEpisodeCommandDataSource>();
            _updateEpisodesService         = Substitute.For <IUpdateEpisodesService>();

            _handler = new RefreshEpisodesCommandHandler(_subscriptionQueryDataSource, _subscriptionCommandDataSource, _episodeCommandDataSource, _updateEpisodesService);

            _subscription = CreateSubscription(1, 555, "The Stuff", DateTime.Now.AddDays(-2).Date);
        }
コード例 #4
0
        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 DeleteSubscriptionCommandHandlerTests()
 {
     _subscriptionCommandDataSource = Substitute.For <ISubscriptionCommandDataSource>();
     _episodeCommandDataSource      = Substitute.For <IEpisodeCommandDataSource>();
     _handler = new DeleteSubscriptionCommandHandler(_subscriptionCommandDataSource, _episodeCommandDataSource);
 }
コード例 #6
0
 public UpdateEpisodesService(IEpisodeCommandDataSource episodeCommandDataSource, ITvMazeService tvMazeService)
 {
     _episodeCommandDataSource = episodeCommandDataSource;
     _tvMazeService            = tvMazeService;
 }
コード例 #7
0
 public DeleteSubscriptionCommandHandler(ISubscriptionCommandDataSource subscriptionCommandDataSource,
                                         IEpisodeCommandDataSource episodeCommandDataSource)
 {
     _subscriptionCommandDataSource = subscriptionCommandDataSource;
     _episodeCommandDataSource      = episodeCommandDataSource;
 }
コード例 #8
0
 public DeleteEpisodesCommandHandler(IEpisodeCommandDataSource episodeCommandDataSource)
 {
     _episodeCommandDataSource = episodeCommandDataSource;
 }