Ejemplo n.º 1
0
        public void Recipe_UpdateAmount_UpdateJoinTabaleAndLocalObject()
        {
            Recipe testRecipe = new Recipe("Pot Pie", "Microwave it");

            testRecipe.Save();
            Ingredient testIngredient = new Ingredient("Pepper");

            testIngredient.Save();
            testRecipe.AddIngredient(testIngredient, "1 dash ");

            testRecipe.UpdateAmount(testIngredient, "1 pound ");
            List <Ingredient> outputList = testRecipe.GetIngredient();
            List <Ingredient> verifyList = new List <Ingredient> {
                testIngredient
            };

            string output = outputList[0].GetAmount() + outputList[0].GetName();
            string verify = "1 pound Pepper";

            Assert.Equal(verify, output);
        }