public void AddingMovie_ValidMovie_ShouldIncrementCountOfMoviesInDb() { // Arrange var currentMovieCount = _dal.GetMovies().Count(); // Act _controller.Create(_movieToCreate); // Assert var newMovieCount = _dal.GetMovies().Count(); Assert.AreEqual(1, newMovieCount - currentMovieCount); }
public void GetMovies_WithResults_ReturnsResults() { // ARRANGE // ACT var result = _dal.GetMovies(); var expectedCount = 2; var actualCount = result.Count(); var expectedList = _movies.ToList(); var actualList = result.ToList(); // ASSERT Assert.AreEqual(expectedCount, actualCount); CollectionAssert.AreEqual(expectedList, actualList); }