public void Test_Delete_DeletesCuisineAndRestaurantsAndReviewsByCuisineId()
        {
            //Arrange
              Cuisine firstCuisine = new Cuisine("Fast Food");
              firstCuisine.Save();
              Cuisine secondCuisine = new Cuisine("Mexican");
              secondCuisine.Save();

              Restaurant firstRestaurant = new Restaurant("McDonalds", firstCuisine.GetId());
              firstRestaurant.Save();
              Restaurant secondRestaurant = new Restaurant("Chipotle", secondCuisine.GetId());
              secondRestaurant.Save();

              Review firstReview = new Review("Test", firstRestaurant.GetId(), 2);
              firstReview.Save();
              Review secondReview = new Review("Test2", secondRestaurant.GetId(), 2);
              secondReview.Save();

              List<Cuisine> expectedCuisine = new List<Cuisine>{firstCuisine};
              List<Restaurant> expectedRestaurant = new List<Restaurant> {firstRestaurant};
              List<Review> expectedReview = new List<Review> {firstReview};

              //Act
              secondCuisine.Delete();
              List<Cuisine> resultingCuisine = Cuisine.GetAll();
              List<Restaurant> resultingRestaurant = Restaurant.GetAll();
              List<Review> resultingReview = Review.GetAll();

              //Assert
              Assert.Equal(expectedCuisine, resultingCuisine);
              Assert.Equal(expectedRestaurant, resultingRestaurant);
              Assert.Equal(expectedReview, resultingReview);
        }
        public void Test_CalculateAverageRating_CorrectlySavesAveragesRatings()
        {
            //Arrange
              Restaurant newRestaurant = new Restaurant("McDonalds", 1);
              newRestaurant.Save();

              Review firstReview = new Review("Yummy", newRestaurant.GetId(), 2, 4);
              firstReview.Save();
              Review secondReview = new Review("Ok", newRestaurant.GetId(), 1, 3);
              secondReview.Save();

              //Act
              double result = newRestaurant.CalculateAverageRating();
              newRestaurant.SetAverageRating(result);
              double resultToCheck = newRestaurant.GetAverageRating();
              //Assert
              Assert.Equal(3.5, resultToCheck);
        }
        public void Test_Find_ReturnsASpecificRestaurantObject()
        {
            //Arrange
              Restaurant newRestaurant = new Restaurant("McDonalds", 1);
              newRestaurant.Save();

              //Act
              Restaurant foundRestaurant = Restaurant.Find(newRestaurant.GetId());

              //Assert
              Assert.Equal(newRestaurant, foundRestaurant);
        }
        public void Test_SetNameAndId_AdjustsDatabaseCorrectly()
        {
            // Arrange
              Restaurant firstRestaurant = new Restaurant("McDonalds", 1);
              firstRestaurant.Save();

              //Act
              firstRestaurant.SetName("Chipotle");
              firstRestaurant.SetCuisineId(2);
              Restaurant resultRestaurant = Restaurant.Find(firstRestaurant.GetId());

              //Assert
              Assert.Equal(firstRestaurant.GetName(), resultRestaurant.GetName());
              Assert.Equal(firstRestaurant.GetCuisineId(), resultRestaurant.GetCuisineId());
        }
        public void Test_GetReviews_FindsReviewsByRestaurantId()
        {
            //Arrange
              Restaurant newRestaurant = new Restaurant("Fast Food", 1);
              newRestaurant.Save();

              Review firstReview = new Review("McDonalds", newRestaurant.GetId(), 2);

              firstReview.Save();
              Review secondReview = new Review("Dennys", 2, 2);
              secondReview.Save();
              List<Review> expectedResult = new List<Review> {firstReview};
              //Act
              List<Review> result = newRestaurant.GetReviews();
              //Assert
              Assert.Equal(expectedResult, result);
        }