Beispiel #1
0
        public void Test_ByCuisine_ReturnsTrueIfListsAreTheSame()
        {
            //Arrange
            Cuisine    newCuisine       = new Cuisine("Sushi");
            Restaurant firstRestaurant  = new Restaurant("Sushi Sakura", "a sushi place", 1, newCuisine.GetId());
            Restaurant secondRestaurant = new Restaurant("Saburos", "a sushi place", 2, newCuisine.GetId());

            //Act
            newCuisine.Save();
            firstRestaurant.Save();
            secondRestaurant.Save();
            List <Restaurant> result   = Restaurant.ByCuisine();
            List <Restaurant> testList = new List <Restaurant> {
                firstRestaurant, secondRestaurant
            };

            //Assert
            Assert.Equal(testList, result);
        }