public void DownloadSubtitle_MatchingSubtitlesDownloaderSucceeds_DownloaderShouldDownloadFirstLanguage(
            string file,
            Subtitle[] matches,
            TvReleaseIdentity identity,
            ISubtitleRanker subtitleRanker,
            IEpisodeSubtitleDownloader fakeDownloader,
            IEnhancementProvider enhancementProvider
            )
        {
            var languages = matches.Skip(1).Select(m => m.Language);
            var expectedLanguage = languages.First();
            A.CallTo(() => fakeDownloader.SearchSubtitle(A<TvReleaseIdentity>._, A<Language[]>._)).Returns(matches);
            A.CallTo(() => fakeDownloader.TryDownloadSubtitle(A<Subtitle>._, A<string>._)).Returns(true);
            A.CallTo(() => fakeDownloader.CanHandleAtLeastOneOf(A<Language[]>._)).Returns(true);
            var downloaders = new[] { fakeDownloader };
            var service = new SubtitleDownloadService(downloaders, enhancementProvider, subtitleRanker);

            service.DownloadSubtitle(file, identity, languages);

            A.CallTo(() => fakeDownloader.TryDownloadSubtitle(A<Subtitle>.That.Matches(s => s.Language == expectedLanguage), A<string>._))
                .MustHaveHappened(Repeated.Exactly.Once);
        }
        public void DownloadSubtitle_MatchingSubtitlesDownloaderSucceeds_ShouldReturnTrue(
            string file,
            TvReleaseIdentity identity,
            Subtitle[] matches,
            ISubtitleRanker subtitleRanker,
            IEpisodeSubtitleDownloader fakeDownloader,
            IEnhancementProvider enhancementProvider
            )
        {
            var languages = matches.Select(m => m.Language);
            A.CallTo(() => fakeDownloader.SearchSubtitle(A<TvReleaseIdentity>._, A<Language[]>._)).Returns(matches);
            A.CallTo(() => fakeDownloader.TryDownloadSubtitle(A<Subtitle>._, A<string>._)).Returns(true);
            A.CallTo(() => fakeDownloader.CanHandleAtLeastOneOf(A<Language[]>._)).Returns(true);
            var downloaders = new[] { fakeDownloader };
            var service = new SubtitleDownloadService(downloaders, enhancementProvider, subtitleRanker);

            bool success = service.DownloadSubtitle(file, identity, languages);

            Assert.That(success, Is.True);
        }