public Drink(DrinkTypes type, int price, int needCoffee, int needMilk, int needWater, int needSugar) { Type = type; Price = price; NeedCoffee = needCoffee; NeedMilk = needMilk; NeedWater = needWater; NeedSugar = needSugar; }
public TrackedDayRecordViewModel() { DrinkTypes = Mapper.Map <ObservableCollection <DrinkTypeViewModel> >(DrinkTypesService.GetAll()); DrinkType = DrinkTypes.FirstOrDefault(); Time = DateTime.Now.TimeOfDay; Volume = _step; DecreasePortionCommand = new Command(DecreasePortion); IncreasePortionCommand = new Command(IncreasePortion); }
public string AddExtras(DrinkTypes type) { if (type == DrinkTypes.Tea) { //the actions for steep the water in the tea return("Add lemon"); } else if (type == DrinkTypes.Coffee) { //the actions to brew the coffee ground return("Add sugar and milk"); } return(string.Empty); }
public ActionResult Select(DrinkTypes type) { var drink = new DrinkMaker(); var messages = new List <string>(); messages.Add(drink.BoilWater()); messages.Add(drink.AddPowder(type)); messages.Add(drink.PourDrink(type)); messages.Add(drink.AddExtras(type)); var hotDrink = new HotDrink(); hotDrink.Label = type.ToString(); hotDrink.Messages = messages; return(View(hotDrink)); }
public Drink this[DrinkTypes drinkType] { get { if (drinkList is null) { throw new ArgumentException("No drink recipes added!"); } foreach (var drinkItem in drinkList) { if (drinkType == drinkItem.Type) { return(drinkItem); } } throw new ArgumentException("Invalid drink type!"); } }
public string AddPowder(DrinkTypes type) { if (type == DrinkTypes.Tea) { //the action for steep the water in the tea return("Steep the water in the tea"); } else if (type == DrinkTypes.Coffee) { //the actions to brew the coffee ground return("Brew the coffee ground"); } else if (type == DrinkTypes.Chocolate) { //the actions for adding drinking chocolate powder to the water return("Add drinking chocolate powder to the water"); } return(string.Empty); }
public void AddDrink(DrinkTypes type, int price, int needCoffee, int needMilk, int needWater, int needSugar) { drinkList.Add(new Drink(type, price, needCoffee, needMilk, needWater, needSugar)); }
public IMealItem GetDrink(DrinkTypes type) { // could be: go to the refrigerator and take a drink ... return new Drink(type, PriceList.GetDrinkPrice(type)); }
public Drink(DrinkTypes type, decimal price) : base(price) { Type = type; }
public decimal GetDrinkPrice(DrinkTypes type) { return(_drinksPriceList[type]); }
public Order(BurgerTypes burgerType, DrinkTypes drinkType, ToyTypes toyType) { BurgerType = burgerType; DrinkType = drinkType; ToyType = toyType; }
public void GetDrink_returns_burger_having_specified_type(DrinkTypes type) { var drink = (Drink)_operations.GetDrink(type); Assert.AreEqual(type, drink.Type); }
public string PourDrink(DrinkTypes type) { //the actions for pouring the drink return("Pour " + type.ToString() + " in the cup"); }
public IMealItem GetDrink(DrinkTypes type) { // could be: go to the refrigerator and take a drink ... return(new Drink(type, PriceList.GetDrinkPrice(type))); }
public Drink(string name, int quantity, decimal taxPercent, DrinkTypes drinkTypes) : base(name, quantity, taxPercent) { TypesOfDrink = drinkTypes; }
public ActionResult Index() { var types = new DrinkTypes(); return(View(types)); }
public void GetDrink_returns_burger_having_price_from_PriceList(DrinkTypes type) { _operations.GetDrink(type); _mockPriceList.Verify(x => x.GetDrinkPrice(type), Times.Once()); }
public decimal GetDrinkPrice(DrinkTypes type) { return _drinksPriceList[type]; }