public void GetNumberOfRates()
        {
            IMovieRatingsService mrs = new MovieRatingsServiceLinq(repository);

            double seconds = TimeInSeconds(() =>
            {
                double result = mrs.GetNumberOfRates(movieMostReviews, 3);
            });

            Assert.True(seconds <= 4);
        }
        public void GetNumberOfRates(int movie, int rate, int expected)
        {
            ratings = new MovieRating[]
            {
                new MovieRating(1, 2, 3, DateTime.Now),
                new MovieRating(2, 2, 4, DateTime.Now),
                new MovieRating(3, 2, 4, DateTime.Now)
            };
            IMovieRatingsService mrs = new MovieRatingsServiceLinq(repoMock.Object);

            var result = mrs.GetNumberOfRates(movie, rate);

            Assert.Equal(expected, result);
            repoMock.Verify(repo => repo.GetAllMovieRatings(), Times.Once);
        }
Exemple #3
0
        public void GetNumberOfRates(int grade)
        {
            IMovieRatingsService mrs = new MovieRatingsServiceLinq(repository);

            mrs.GetNumberOfRates(movieMostReviews, grade);
        }
Exemple #4
0
 public void GetNumberOfRates(int rate)
 {
     service.GetNumberOfRates(movieMostReviews, rate);
 }