Esempio n. 1
0
        public void AddRecipe_OneIngredient_RecipeAssociatedWithIngredientAddedToJoinTable()
        {
            //Arrange
            Ingredient testIngredient = new Ingredient("Pepper");

            testIngredient.Save();
            Recipe testRecipe = new Recipe("Pot Pie", "Microwave it");

            testRecipe.Save();
            testIngredient.AddRecipe(testRecipe);

            //Act
            List <Recipe> output = testIngredient.GetRecipesByIngredient();
            List <Recipe> verify = new List <Recipe> {
                testRecipe
            };

            //Assert
            Assert.Equal(verify, output);
        }