예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }