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

            double seconds = TimeInSeconds(() =>
            {
                mrs.GetMoviesWithHighestNumberOfTopRates();
            });

            Assert.True(seconds <= 4);
        }
Exemplo n.º 2
0
        public void GetMoviesWithHighestNumberOfTopRates()
        {
            ratings = new MovieRating[]
            {
                new MovieRating(1, 1, 4, DateTime.Now),
                new MovieRating(1, 2, 5, DateTime.Now),
                new MovieRating(1, 3, 5, DateTime.Now),
                new MovieRating(2, 3, 5, DateTime.Now),
                new MovieRating(3, 3, 4, DateTime.Now),
                new MovieRating(3, 4, 5, DateTime.Now),
                new MovieRating(3, 4, 5, DateTime.Now),
            };
            IMovieRatingsService mrs = new MovieRatingsServiceLinq(repoMock.Object);

            List <int> expected = new List <int>()
            {
                3, 4
            };

            var result = mrs.GetMoviesWithHighestNumberOfTopRates();

            Assert.Equal(expected, result);
            repoMock.Verify(repo => repo.GetAllMovieRatings(), Times.Once);
        }
Exemplo n.º 3
0
        public void GetMoviesWithHighestNumberOfTopRates()
        {
            IMovieRatingsService mrs = new MovieRatingsServiceLinq(repository);

            mrs.GetMoviesWithHighestNumberOfTopRates();
        }
Exemplo n.º 4
0
 public void GetMoviesWithHighestNumberOfTopRates()
 {
     service.GetMoviesWithHighestNumberOfTopRates();
 }