Ejemplo n.º 1
0
        public void PutDishes_StringNoIngredient()
        {
            IngredientsController ingcontroller      = new IngredientsController();
            List <Ingredient>     ingredientswithID  = ingcontroller.GetIngredient().ToList();
            List <Ingredient>     ingredienstodelete = new List <Ingredient>();
            Ingredient            temping            = item.Ingredient.First();

            ingredienstodelete = ingredientswithID.Where(e => e.name == temping.name).ToList();
            foreach (var ing in ingredienstodelete)
            {
                ingcontroller.DeleteIngredient(ing.id, 2);
            }
            item.Ingredient = null;
            var specialpricenull = controller.PutDishess(item.id, 2, item);

            Assert.AreEqual("There was no ingredient attached", specialpricenull);
        }