public S4UDownloader(IApplicationSettings applicationSettings)
 {
     var settings = new S4USettings
     {
         ApiKey = applicationSettings.GetSetting("S4UApiKey")
     };
     _api = new S4UApi(settings);
 }
        public void SearchByTvdbId_ReleaseExists_ContainsSubs()
        {
            var api = new S4UApi(new S4USettings { ApiKey = "ApiTestKey" });

            var result = api.SearchByTvdbId(79501, null, new S4ULimits { Season = 1, Episode = 1 });

            Assert.That(result.Series.First().Subs, Is.Not.Empty);
        }
        public void SearchByTitle_TitleExists_ContainsSubs()
        {
            var api = new S4UApi(new S4USettings {ApiKey = "ApiTestKey" });

            var result = api.SearchByTitle("Heroes", new S4ULimits { Season = 1, Episode = 1});

            Assert.That(result.Series.First().Subs, Is.Not.Empty);
        }
        public void SearchByTvdbIdAndEpisodeId_ReleaseExists_ContainsSubs()
        {
            var api = new S4UApi(new S4USettings { ApiKey = "ApiTestKey" });

            var limits = new S4ULimits();
            limits.Custom.Add("tvdb_ep_id", "308907");

            var result = api.SearchByTvdbId(79501, null, limits);

            Assert.That(result.Series.First().Subs, Is.Not.Empty);
        }