Пример #1
0
        public void GetAllReviewsTest1()
        {
            string         expName     = "Restaurant1";
            string         expLocation = "123 One St.";
            RestaurantInfo rest        = new RestaurantInfo(expName, expLocation);

            var l = rest.GetAllReviews();

            foreach (var review in l)
            {
                Assert.Fail();
            }
            Assert.IsTrue(l.Count() == 0);
        }
Пример #2
0
        public void GetAllReviewsTest2()
        {
            string         expName     = "Restaurant1";
            string         expLocation = "123 One St.";
            RestaurantInfo rest        = new RestaurantInfo(expName, expLocation);

            rest.SubmitReview("Reviewer1", 5);
            rest.SubmitReview("Reviewer2", 4);
            rest.SubmitReview("Reviewer3", 3);
            rest.SubmitReview("Reviewer4", 2);
            rest.SubmitReview("Reviewer5", 1);

            var l = rest.GetAllReviews();

            foreach (var review in l)
            {
                Assert.AreEqual(review.ReviewerName.Length, 9);
            }
            Assert.IsTrue(l.Count() == 05);
        }