コード例 #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());
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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());
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }