Exemplo 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());
        }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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());
        }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
        }