public ICoffeeMachineCommandResponse Execute(ICoffeeOrder order) { int creams = order.CurrentWorkingCoffee?.Creams ?? 0; order.SetCurrentWorkingCoffeeCreams(creams + 1); return(new CoffeeMachineCommandResponse($"Creams increased by 1 to {order.CurrentWorkingCoffee.Creams}.")); }
public ICoffeeMachineCommandResponse Execute(ICoffeeOrder order) { order.SetCurrentWorkingCoffeeCreams(order.CurrentWorkingCoffee.Creams - 1); return(new CoffeeMachineCommandResponse($"Creams reduced by 1 to {order.CurrentWorkingCoffee.Creams}.")); }
public ICoffeeMachineCommandResponse Execute(ICoffeeOrder order) { order.SetCurrentWorkingCoffeeCreams(Sugars); return(new CoffeeMachineCommandResponse($"Coffee sugars set to ${Sugars}")); }