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

            int res = mr.MovieRevCount(2534508);
            int exp = 44;

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

            Random    rnd = new Random();
            Stopwatch sw  = Stopwatch.StartNew();
            int       res = mr.MovieRevCount(2534508);

            sw.Stop();

            Assert.IsTrue(sw.ElapsedMilliseconds < 4000);
        }