Example #1
0
        public void T5()
        {
            var gRating = new MpaaRatingAtMostSpecification(MpaaRating.G);
            var goodMovie = new GoodMovieSpecification();
            var repository = new MovieRepository();

            IReadOnlyList<Movie> movies = repository.Find(gRating.Or(goodMovie));

            movies.Count.ShouldEqual(2);
        }
Example #2
0
        public void T5()
        {
            var gRating    = new MpaaRatingAtMostSpecification(MpaaRating.G);
            var goodMovie  = new GoodMovieSpecification();
            var repository = new MovieRepository();

            IReadOnlyList <Movie> movies = repository.Find(gRating.Or(goodMovie));

            movies.Count.ShouldEqual(2);
        }
Example #3
0
        public void UseOrComposition()
        {
            //-- Arrange
            var gRating    = new MpaaRatingAtMostSpecification(MpaaRating.G);
            var goodMovie  = new GoodMovieSpecification();
            var repository = new MovieRepository();

            //-- Act
            var movies = repository.Find(gRating.Or(goodMovie));

            //-- Assert
            Assert.Equal(4, movies.Count());
        }