public void It_Should_Count_Movies() { var movieContext = new MoviesContextMock(new List<Movie> {new Movie(), new Movie()}); const int expectedCount = 2; var actualCount = movieContext.GetNumberOfMovies(); Assert.AreEqual(expectedCount, actualCount); }
public void It_Should_Add_Movies() { var movieToAdd = new Movie {Title = "robocop"}; var movieContextMock = new MoviesContextMock(new List<Movie>()); movieContextMock.AddMovie(movieToAdd); int actualCount = movieContextMock.GetNumberOfMovies(); Assert.AreEqual(1, actualCount); Assert.AreEqual("robocop", movieContextMock.Movies.ToList()[0].Title); }
public void It_Should_Count_Movies() { var movieContext = new MoviesContextMock(new List <Movie> { new Movie(), new Movie() }); const int expectedCount = 2; var actualCount = movieContext.GetNumberOfMovies(); Assert.AreEqual(expectedCount, actualCount); }
public void It_Should_Add_Movies() { var movieToAdd = new Movie { Title = "robocop" }; var movieContextMock = new MoviesContextMock(new List <Movie>()); movieContextMock.AddMovie(movieToAdd); int actualCount = movieContextMock.GetNumberOfMovies(); Assert.AreEqual(1, actualCount); Assert.AreEqual("robocop", movieContextMock.Movies.ToList()[0].Title); }