public async Task GetMoviesShouldZeroLoadMovies() { // Act var request = new MoviesController.MoviesRequest(); IEnumerable <Movie> movies = await _controller.GetMovies(request); // Assert Assert.AreEqual(0, movies.Count()); }
public async Task GetMoviesShouldOneLoadMovies() { // Arrange await _session.StoreAsync(new Movie()); await _session.SaveChangesAsync(); // Act var request = new MoviesController.MoviesRequest(); IEnumerable <Movie> movies = await _controller.GetMovies(request); // Assert Assert.AreEqual(1, movies.Count()); }
public async Task GetMoviesShouldZeroLoadMovieWithGenre() { // Arrange await _session.StoreAsync(new Movie { Genres = new[] { "g1" } }); await _session.StoreAsync(new Movie()); await _session.SaveChangesAsync(); // Act var request = new MoviesController.MoviesRequest { Genres = new[] { "g2" } }; IEnumerable <Movie> movies = await _controller.GetMovies(request); // Assert Assert.AreEqual(0, movies.Count()); }