Beispiel #1
0
        public void MovofRevTest()
        {
            IMovieFunctions mr = new MovieFunctions
            {
                Reviews = reviews
            };

            List <int> exp = reviews.OrderByDescending(m => m.Grade).ThenByDescending(m => m.Date).Select(m => m.Movie).ToList();
            List <int> res = mr.ReviewersMovies(1);

            Assert.AreEqual(exp, res);
        }
Beispiel #2
0
        public void MovofRevPerfTest()
        {
            IMovieFunctions mr = new MovieFunctions
            {
                Reviews = reviews
            };

            Stopwatch sw = Stopwatch.StartNew();

            mr.ReviewersMovies(1);
            sw.Stop();
            Assert.IsTrue(sw.ElapsedMilliseconds <= 4000);
        }