public void ShouldSendResponseStringToFindShowByNameInResponseParser() { const string ResponseString = "Dummy Response String"; SubtitleServiceResponseDeserializer responseParser = repository.DynamicMock<SubtitleServiceResponseDeserializer>(); Expect.Call(responseParser.GetTvShows(ResponseString)).Return(new List<TvShow>()); ITvShows tvShows = repository.DynamicMock<ITvShows>(); Expect.Call(tvShows.FindShowByName(string.Empty)).Return(ResponseString).IgnoreArguments(); ServiceChannelFactory serviceChannelFactory = repository.DynamicMock<ServiceChannelFactory>(CreateSubtitlesConfiguration()); Expect.Call(serviceChannelFactory.CreateChannel()).Return(tvShows); ShowService subtitlesService = new ShowService(responseParser, serviceChannelFactory); repository.ReplayAll(); subtitlesService.FindShowsByName("Flash"); repository.VerifyAll(); }
public ShowReader(ShowStorage showStorage, ShowService showService) { this.showStorage = showStorage; this.showService = showService; numberOfCacheHits = 0; }
public SubtitleDownloader(ShowService subtitleService) { this.subtitleService = subtitleService; }