Ejemplo n.º 1
0
        public void AvgRateTest()
        {
            IMovieFunctions mr = new MovieFunctions
            {
                Reviews = reviews
            };

            double res = mr.MovieRevAvg(2534508);
            var    exp = 3.15909090909091;

            Assert.AreEqual(exp, res);
        }
Ejemplo n.º 2
0
        public void AvgRatePerfTest()
        {
            IMovieFunctions mr = new MovieFunctions
            {
                Reviews = reviews
            };

            Stopwatch sw = Stopwatch.StartNew();

            mr.MovieRevAvg(1488844);
            sw.Stop();

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