public async Task ImportMovieAsync_VerifyNoTitleReturnsEmptyMovieObject() { var httpclient = new HttpClient(); var tmdbapi = new TMDBapi(httpclient); var fis = new FetchImportService(tmdbapi); var tmdb_id = 299534; var Movie = await fis.ImportMovieAsync(tmdb_id); Assert.IsNotNull(Movie); Assert.IsTrue(string.IsNullOrEmpty(Movie.Title)); Assert.IsTrue(Movie.TMDB_ID == 0); }
public async Task ImportMovieAsync_VerifySuccessfulImport() { var httpclient = new HttpClient(); var tmdbapi = new TMDBapi(httpclient); var fis = new FetchImportService(tmdbapi); var tmdb_id = 299534; var expectedGenreCount = 3; var Movie = await fis.ImportMovieAsync(tmdb_id); Assert.IsNotNull(Movie); Assert.IsTrue(!string.IsNullOrEmpty(Movie.Title)); Assert.IsTrue(Movie.TMDB_ID == tmdb_id); Assert.IsNotNull(Movie.Genres); Assert.AreEqual(Movie.Genres.Count, expectedGenreCount); }