public async Task UpdateMovieAsync_Exisiting_Movie_Should_Return_True() { Movies.API.Movies movie = new Movies.API.Movies { Id = 9, Name = "New Movie", PortraitUrl = "none", Year = 2021 }; var result = await _sut.UpdateMovieAsync(movie); Assert.IsTrue(result); }
public async Task UpdateMovieAsync_Missing_Movie_Should_Return_False() { Movies.API.Movies movie = new Movies.API.Movies { Id = 999, Name = "Does not Exist", PortraitUrl = "none", Year = 2021 }; var result = await _sut.UpdateMovieAsync(movie); Assert.IsFalse(result); }
public async Task CreateMovieAsync_Should_Return_New_Movie_With_New_Id() { Movies.API.Movies movie = new Movies.API.Movies { Id = 0, Name = "New Movie", PortraitUrl = "none", Year = 2000 }; var data = await _sut.CreateMovieAsync(movie); Assert.IsTrue(data.Id == 11); }
public async Task UpdateMovieAsync_ArgumentNullException() { Movies.API.Movies movie = null; var data = await _sut.UpdateMovieAsync(movie); }