public void NrofRevsofUserTest() { IMovieFunctions mf = new MovieFunctions { Reviews = reviews }; int res = mf.NrOfReviews(3); int exp = 2012; Assert.AreEqual(exp, res); }
public void NumberOfReviewsOfUserTestPerfTest() { IMovieFunctions mf = new MovieFunctions { Reviews = reviews }; Random rand = new Random(); Stopwatch timer = Stopwatch.StartNew(); mf.NrOfReviews(rand.Next(1, 999)); timer.Stop(); Assert.IsTrue(timer.ElapsedMilliseconds < 4000); }