Example #1
0
        public async Task FetchMovieAsync_VerifyEmptyTitleReturnsNull()
        {
            var httpclient = new HttpClient();
            var tmdbapi    = new TMDBapi(httpclient);
            var fis        = new FetchImportService(tmdbapi);
            var title      = "";

            var searchmovies = await fis.FetchMovieAsync(title);

            Assert.IsTrue(searchmovies == null);
        }
Example #2
0
        public async Task FetchMovieAsync_VerifyValidTitleReturnsObject()
        {
            var httpclient = new HttpClient();
            var tmdbapi    = new TMDBapi(httpclient);
            var fis        = new FetchImportService(tmdbapi);
            var title      = "Superman";

            var searchmovies = await fis.FetchMovieAsync(title);

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