Esempio n. 1
0
        public void GetCountOfGradesGottenByMovie_ValidArgumentse()
        {
            MovieReviewRepository movieRatingRepository = new MovieReviewRepository();

            movieRatingRepository.AddJSON(movieRatingList);
            IMovieRatingService movieRatingService = new MovieRatingService(movieRatingRepository);

            Assert.True(Time(() => movieRatingService.getCountOfGradesGottenByMovie(9, 1)) < 4);
        }
Esempio n. 2
0
        public void GetTopGradedMovies_ValidArguments()
        {
            MovieReviewRepository movieRatingRepository = new MovieReviewRepository();

            movieRatingRepository.AddJSON(movieRatingList);
            IMovieRatingService movieRatingService = new MovieRatingService(movieRatingRepository);

            Assert.True(Time(() => movieRatingService.getIdOfTopGradedMovies()) < 4);
        }
Esempio n. 3
0
        public void AverageRatingRecievedByMovie_ValidArguments()
        {
            MovieReviewRepository movieRatingRepository = new MovieReviewRepository();

            movieRatingRepository.AddJSON(movieRatingList);
            IMovieRatingService movieRatingService = new MovieRatingService(movieRatingRepository);

            Assert.True(Time(() => movieRatingService.averageRatingRecievedByMovie(1)) < 4);
        }
Esempio n. 4
0
        public void GetCountOfMovieReviewers_ValidArguments( )
        {
            MovieReviewRepository movieRatingRepository = new MovieReviewRepository();

            movieRatingRepository.AddJSON(movieRatingList);
            IMovieRatingService movieRatingService = new MovieRatingService(movieRatingRepository);

            Assert.True(Time(() => movieRatingService.getCountOfMovieReviewers(1)) < 4);
        }
Esempio n. 5
0
        public void GetAverageRateGivenByReviewer_ValidArguments( )
        {
            MovieReviewRepository movieRatingRepository = new MovieReviewRepository();

            movieRatingRepository.AddJSON(movieRatingList);
            IMovieRatingService movieRatingService = new MovieRatingService(movieRatingRepository);

            Assert.True(Time(() => movieRatingService.getAverageRateGivenByReviewer(5)) < 4);
        }
Esempio n. 6
0
        public void GetNumberOfReviewsFromReviewer_ValidArguments()
        {
            MovieReviewRepository movieRatingRepository = new MovieReviewRepository();

            movieRatingRepository.AddJSON(movieRatingList);
            IMovieRatingService movieRatingService = new MovieRatingService(movieRatingRepository);

            Assert.True(Time(() => movieRatingService.getNumberOfReviewsFromReviewer(2)) < 4);
        }
Esempio n. 7
0
        public void GetNumberOfReviewsFromReviewer_BaitClass()
        {
            MovieReviewRepository movieRatingRepository = new MovieReviewRepository();

            movieRatingRepository.AddJSON(movieRatingList);
            IMovieRatingService movieRatingService = new MovieRatingService(movieRatingRepository);

            Assert.False(Time(() => movieRatingService.getNumberOfReviewsFromReviewer(1)) < 0);
        }