Example #1
0
        public void T3()
        {
            var movie      = new Movie("Some Movie", new DateTime(2010, 2, 1), MpaaRating.G, "Triller", 7);
            var pg13Rating = new MpaaRatingAtMostSpecification(MpaaRating.PG13);

            bool isSatisfiedBy = pg13Rating.IsSatisfiedBy(movie);

            isSatisfiedBy.ShouldEqual(true);
        }
Example #2
0
        public void T3()
        {
            var movie = new Movie("Some Movie", new DateTime(2010, 2, 1), MpaaRating.G, "Triller", 7);
            var pg13Rating = new MpaaRatingAtMostSpecification(MpaaRating.PG13);

            bool isSatisfiedBy = pg13Rating.IsSatisfiedBy(movie);

            isSatisfiedBy.ShouldEqual(true);
        }
Example #3
0
        public void SatisfyOneCriteria()
        {
            //-- Arrange
            var movie = new Movie
            {
                Name        = "Las Vegas parano",
                ReleaseDate = new DateTime(1998, 8, 19),
                MpaaRating  = MpaaRating.G,
                Genre       = "drama comedy",
                Rating      = 10
            };

            var pg13Rating = new MpaaRatingAtMostSpecification(MpaaRating.G);

            //-- Act
            bool isSatisfiedBy = pg13Rating.IsSatisfiedBy(movie);

            //-- Assert
            Assert.True(isSatisfiedBy);
        }
Example #4
0
        public void SatisfyNotOneCriteria()
        {
            //-- Arrange
            var movie = new Movie
            {
                Name        = "C\'est arrivé près de chez vous",
                ReleaseDate = new DateTime(1992, 11, 4),
                MpaaRating  = MpaaRating.R,
                Genre       = "drama comedy",
                Rating      = 9
            };

            var pg13Rating = new MpaaRatingAtMostSpecification(MpaaRating.G);

            //-- Act
            bool isSatisfiedBy = pg13Rating.IsSatisfiedBy(movie);

            //-- Assert
            Assert.False(isSatisfiedBy);
        }