public void AvgofRevTest() { IMovieFunctions mf = new MovieFunctions { Reviews = reviews }; double exp = 3.64115308151093; double res = mf.AvgOfReviewer(3); Assert.AreEqual(exp, res); }
public void AvgofRevPerfTest() { IMovieFunctions mr = new MovieFunctions { Reviews = reviews }; Random rnd = new Random(); Stopwatch sw = Stopwatch.StartNew(); double res = mr.AvgOfReviewer(rnd.Next(1, 999)); sw.Stop(); Assert.IsTrue(sw.ElapsedMilliseconds < 4000); }