public void FollowMovieTest() { MovieDTO inputMovie = TestingHelper.GetRandomMovie(); string userId = Guid.NewGuid().ToString(); List <string> followedMovies; // 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); // Test FollowMovie() movieLogic.FollowMovie(inputMovie.ImdbId, userId); } using (var context = new Cinephiliacs_MovieContext(dbOptions)) { RepoLogic repoLogic = new RepoLogic(context); IMovieLogic movieLogic = new MovieLogic(repoLogic); MovieController movieController = new MovieController(movieLogic); // Test FollowMovie() followedMovies = movieController.GetFollowingMovies(userId).Value; } Assert.Contains(inputMovie.ImdbId, followedMovies); }