public async Task NotNotifySameStreamWithin1Hr( int minimumViewers, int expectedNotificationCount, [Frozen] ISettingsHandler settingsHandler, [Frozen] INotificationHandler notificationHandler, [Frozen] IEnumerable <IApiClient> apiClients, [Frozen] List <LivestreamQueryResult> livestreamQueryResults, PopularLivestreamWatcher sut) { var apiClient = apiClients.First(); SetupApiClient(apiClient, livestreamQueryResults); settingsHandler.Settings.MinimumEventViewers = minimumViewers; await sut.NotifyPopularStreams(); await sut.NotifyPopularStreams(); notificationHandler.Received(expectedNotificationCount).AddNotification(Arg.Any <LivestreamNotification>()); }
public async Task NotNotifyWhenBelowMinimumViewers( [Frozen] ISettingsHandler settingsHandler, [Frozen] INotificationHandler notificationHandler, [Frozen] IEnumerable <IApiClient> apiClients, [Frozen] List <LivestreamQueryResult> livestreamQueryResults, PopularLivestreamWatcher sut) { var apiClient = apiClients.First(); SetupApiClient(apiClient, livestreamQueryResults); settingsHandler.Settings.MinimumEventViewers = 2000; await sut.NotifyPopularStreams(); notificationHandler.DidNotReceive().AddNotification(Arg.Any <LivestreamNotification>()); }