Esempio n. 1
0
        public async Task GetExternalIdsAsync_ValidId_ReturnsValidResult(string id)
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            MovieExternalId result = await apiUnderTest.GetExternalIdsAsync(id, apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.AreEqual(id, result.Id.ToString());
        }
Esempio n. 2
0
        public async Task SearchTVShowsAsync_FamousActor_ReturnResults(string tvShowName)
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            TvShowList result = await apiUnderTest.SearchTVShowsAsync(tvShowName, apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.IsNotEmpty(result.Results);
        }
Esempio n. 3
0
        public async Task GetEpisodeExternalIdsAsync_ValidId_ReturnsValidResult(int id, int seasonNumber, int episodeNumber)
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            MovieExternalId result = await apiUnderTest.GetEpisodeExternalIdsAsync(id, seasonNumber, episodeNumber, apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.AreEqual(63057, result.Id);
        }
Esempio n. 4
0
        public async Task GetEpisodeTranslationsAsync_ValidId_ReturnsValidResult(int id, int seasonNumber, int episodeNumber)
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            TranslationList result = await apiUnderTest.GetEpisodeTranslationsAsync(id, seasonNumber, episodeNumber, apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.IsNotEmpty(result.Translations);
        }
Esempio n. 5
0
        public async Task GetSeasonVideosAsync_ValidId_ReturnsValidResult(int tvId, int seasonNumber)
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            VideoList result = await apiUnderTest.GetSeasonVideosAsync(tvId, seasonNumber, apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.IsNotEmpty(result.Results);
        }
Esempio n. 6
0
        public async Task GetTopRatedAsync_ValidId_ReturnsValidResult()
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            TvShowList result = await apiUnderTest.GetTopRatedAsync(apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.IsNotEmpty(result.Results);
        }
Esempio n. 7
0
        public async Task GetLatestAsync_ValidId_ReturnsValidResult()
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            Tv result = await apiUnderTest.GetLatestAsync(apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.Greater(result.Id, 0);
        }
Esempio n. 8
0
        public async Task GetUserReviewsAsync_ValidId_ReturnsValidResult(string id)
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            UserReview result = await apiUnderTest.GetUserReviewsAsync(id, apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.IsNotEmpty(result.Results);
        }
Esempio n. 9
0
        public async Task GetTranslationsAsync_ValidId_ReturnsValidResult(string id)
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            TranslationList result = await apiUnderTest.GetTranslationsAsync(id, _userApiKey);

            Assert.IsNotNull(result);
            Assert.AreEqual(id, result.Id.ToString());
        }
Esempio n. 10
0
        public async Task GetCreditsAsync_ValidId_ReturnsValidResult(string id)
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            MovieCredits result = await apiUnderTest.GetCreditsAsync(id, apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.IsNotEmpty(result.Cast);
            Assert.IsNotEmpty(result.Crew);
        }
Esempio n. 11
0
        public async Task GetAlternativeTitlesAsync_ValidId_ReturnsValidResult(string id)
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            DTO.Television.AlternativeTitle result = await apiUnderTest.GetAlternativeTitlesAsync(id, apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.AreEqual(id, result.Id.ToString());
            Assert.IsNotEmpty(result.Results);
        }
Esempio n. 12
0
        public async Task GetImagesAsync_ValidId_ReturnsValidResult(string id)
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            Images result = await apiUnderTest.GetImagesAsync(id, apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.AreEqual(id, result.Id.ToString());
            Assert.IsNotEmpty(result.Backdrops);
        }
Esempio n. 13
0
        public async Task GetEpisodeCreditsAsync_ValidId_ReturnsValidResult(int id, int seasonNumber, int episodeNumber)
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            MovieCredits result = await apiUnderTest.GetEpisodeCreditsAsync(id, seasonNumber, episodeNumber, apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.IsNotEmpty(result.Cast);
            Assert.IsNotEmpty(result.Crew);
        }
Esempio n. 14
0
        public async Task GetEpisodeDetailsAsync_ValidId_ReturnsValidResult(int id, int seasonNumber, int episodeNumber)
        {
            ITelevisionApi apiUnderTest = new TelevisionApi(_clientWithNoApiKey);

            Episode result = await apiUnderTest.GetEpisodeDetailsAsync(id, seasonNumber, episodeNumber, apiKey : _userApiKey);

            Assert.IsNotNull(result);
            Assert.AreEqual(episodeNumber, result.Episode_number);
            Assert.AreEqual(seasonNumber, result.Season_number);
        }