private Kiosk BuildKiosken(params int[] ratings) { var result = new Kiosk(); result.Reviews = ratings.Select(r => new Review() { Rating = r }).ToList(); return result; }
public void tempTest() { const int NumberOfRatingToUse = 10; var kiosk = new Kiosk(); kiosk.Reviews = new List<Review>(); kiosk.Reviews.Add(new Review() { Rating = 8, }); var rater = new KioskRater(kiosk); var result = rater.ComputeOverallRate(NumberOfRatingToUse); var expected = 8; var actual = result.Rating; Assert.AreEqual(expected, actual); }