public async Task PatchExistingMovieTest() { MovieDTO inputMovie = TestingHelper.GetRandomMovie(); Movie outputMovie; // Seed the test database using (var context = new Cinephiliacs_MovieContext(dbOptions)) { context.Database.EnsureDeleted(); context.Database.EnsureCreated(); TestingHelper.AddMovieDTOToDatabase(context, inputMovie); RepoLogic repoLogic = new RepoLogic(context); IMovieLogic movieLogic = new MovieLogic(repoLogic); MovieController movieController = new MovieController(movieLogic); // Test AppendMovie() await movieController.AppendMovie(inputMovie.ImdbId, TestingHelper.GetRandomMovie()); } using (var context = new Cinephiliacs_MovieContext(dbOptions)) { outputMovie = context.Movies.FirstOrDefault(m => m.ImdbId == inputMovie.ImdbId); } Assert.NotEqual(inputMovie.Title, outputMovie.Title); }