public void Add_NewRecipAddedWithIngredients_ShoppingListModelAddReceivedCall() { var list = new List <Ingredient> { new Ingredient() }; _uut.Add(new Recipe() { Ingredients = list }, new DateTime()); _shoppingListModel.Received().AddItem(Arg.Any <Item>()); }
public void Add_NewRecipAddedWithIngredients_ShoppingListModelHasIngredients() { var list = new List <Ingredient> { new Ingredient() }; _uut.Add(new Recipe() { Ingredients = list }, new DateTime()); Assert.That(_shoppingListModel.ShoppingList.Count > 0); }
/// <summary> /// Adds a recipe to foodplan /// </summary> /// <param name="recipeToAdd"></param> private void AddRecipe(Recipe recipeToAdd) { Window _win; if (Application.ResourceAssembly == null) { _win = null; } else { _win = Application.Current.MainWindow; } var CalenderDialog = _fac.GetCalenderDialog(_win); if (CalenderDialog.ShowDialog()) { _foodplan.Add(recipeToAdd, CalenderDialog.GetDate()); } }