Пример #1
0
        public async Task FetchTVShowsAsync_VerifyEmptyTitleReturnsNull()
        {
            var httpclient = new HttpClient();
            var tmdbapi    = new TMDBapi(httpclient);
            var fis        = new FetchImportService(tmdbapi);
            var title      = "";

            var searchmovies = await fis.FetchTVShowsAsync(title);

            Assert.IsTrue(searchmovies == null);
        }
Пример #2
0
        public async Task FetchTVShowsAsync_VerifyValidTitleReturnsObject()
        {
            var httpclient = new HttpClient();
            var tmdbapi    = new TMDBapi(httpclient);
            var fis        = new FetchImportService(tmdbapi);
            var title      = "House";

            var searchmovies = await fis.FetchTVShowsAsync(title);

            Assert.IsTrue(searchmovies != null);
            Assert.IsTrue(searchmovies.total_results > 0);
        }