public void TestFixtureSetUp() { _drink = new Drink { Name = JustADrinktName, Id = 1, Ingredients = Ingredients() }; }
public void TestFixtureSetUp() { _coffeeMachine = new CoffeeMachine {Ingredients = IngredientsForStock()}; _myCoffeeDrink = new Drink { Id = 1, Ingredients = IngredientsForRecipe(), Name = "Caffee Santo" }; }
public bool IsDrinkAvailable(Drink drink) { var result = true; foreach (var ingredient in drink.Ingredients) { result = Ingredients.First(t => t.Name == ingredient.Name).Units >= ingredient.Units; if (!result) break; } return result; }