public void Integration_FromKitchenWithAvailabileMealPrepareOrder() { KitchenWorker currentKitchen = new KitchenWorker(); Recipe newRecipe = new Recipe(); newRecipe.Name = "SausageStroganoff"; newRecipe.Available = true; newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Sausage", 1)); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Cream", 2.5)); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Tomato puree", 2)); currentKitchen.AddRecipe(newRecipe); newRecipe = new Recipe(); newRecipe.Name = "VeggieStroganoff"; newRecipe.Available = true; newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("VeggieSausage", 1)); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Cream", 2.5)); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Tomato puree", 2)); currentKitchen.AddRecipe(newRecipe); List <OrderItem> newOrder = new List <OrderItem>(); newOrder.Add(new OrderItem("SausageStroganoff", 2)); newOrder.Add(new OrderItem("VeggieStroganoff", 1)); currentKitchen.PrepareOrder(newOrder); Assert.AreEqual(false, true); }
public void ToKitchenAddRecipeWithoutIngredientsAndQuantity() { KitchenWorker currentKitchen = new KitchenWorker(); Recipe newRecipe = new Recipe(); newRecipe.Name = "PyttIPanna"; Assert.AreEqual(false, currentKitchen.AddRecipe(newRecipe)); }
public void ToKitchenAddRecipeWithoutName() { KitchenWorker currentKitchen = new KitchenWorker(); Recipe newRecipe = new Recipe(); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Sausage", 1)); Assert.AreEqual(false, currentKitchen.AddRecipe(newRecipe)); }
public void FromKitchenGetRecipeSimilarName() { KitchenWorker currentKitchen = new KitchenWorker(); Recipe newRecipe = new Recipe(); newRecipe.Name = "SausageStroganoffVeggie"; newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("VeggieSausage", 1)); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Cream", 2.5)); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Tomato puree", 2)); currentKitchen.AddRecipe(newRecipe); newRecipe = new Recipe(); newRecipe.Name = "SausageStroganoff"; newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Sausage", 1)); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Cream", 2.5)); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Tomato puree", 2)); currentKitchen.AddRecipe(newRecipe); Recipe result = currentKitchen.GetRecipe("SausageStroganoff"); Assert.AreEqual(newRecipe.Name, result.Name); }
public void FromKitchenWithoutAvailabileMealsGetPossibleMeals() { KitchenWorker currentKitchen = new KitchenWorker(); Recipe newRecipe = new Recipe(); newRecipe.Name = "SausageStroganoffVeggie"; newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("VeggieSausage", 1)); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Cream", 2.5)); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Tomato puree", 2)); currentKitchen.AddRecipe(newRecipe); List <string> result = currentKitchen.PossibleMeals(); Assert.AreEqual(true, result != null); Assert.AreEqual(0, result.Count); }
public void FromKitchenWithNotAvailabileMealPrepareMeal() { KitchenWorker currentKitchen = new KitchenWorker(); Recipe newRecipe = new Recipe(); newRecipe.Name = "SausageStroganoff"; newRecipe.Available = false; newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Sausage", 1)); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Cream", 2.5)); newRecipe.IngredientsAndQuantity.Add(new KeyValuePair <string, double>("Tomato puree", 2)); currentKitchen.AddRecipe(newRecipe); Boolean result = currentKitchen.PrepareMeal("SausageStroganoff", 1); Assert.AreEqual(false, result); }