public void AddTopping(ITopping top) { if (this.Toppings.Count <= this.MaxToppings) { this.Toppings.Add(top); } }
public Pizza( [Import(typeof(IDough))] IDough dough, [Import(typeof(ITopping))] ITopping topping) { this.Dough = dough; this.Topping = topping; }
public void RemoveToppingFromMenu(ITopping toppingToRemoveFromMenu) { if (ListOfToppingsAvailableInMenu.Contains(toppingToRemoveFromMenu)) { ListOfToppingsAvailableInMenu.Remove/*All*/ (toppingToRemoveFromMenu); } }
public void RemoveToppingFromCup(ITopping toppingToRemove) { if (CupOfToppings.Contains(toppingToRemove)) { CupOfToppings.Remove(toppingToRemove); } }
public void AddToppingToMenu(ITopping toppingToAddToMenu) { if (!ListOfToppingsAvailableInMenu.Contains(toppingToAddToMenu)) { ListOfToppingsAvailableInMenu.Add((ITopping)toppingToAddToMenu); } }
public HomeController(ISize sizeService, IDepth depthService, ITopping toppingService, IPizza pizzaService, IPizzaTopping pizzaToppingService) { _sizeService = sizeService; _depthService = depthService; _toppingService = toppingService; _pizzaService = pizzaService; _pizzaToppingService = pizzaToppingService; }
public void AddTopping(ITopping topping) { if (_ingredient == null) { throw new SaladNotFoundException(); } topping.SetTopping(_ingredient); _ingredient = topping; }
public void ShouldRoastedGarlicCalculateCostAs32Percent() { //Arrange ITopping subject = Topping.RoastedGarlic; //Act Money actual = subject.Cost(new Money(1)); //Assert actual.Should().Be(new Money(0.32)); }
public void ShouldSunDriedTomatoCalculateCostAs32Percent() { //Arrange ITopping subject = Topping.SunDriedTomato; //Act Money actual = subject.Cost(new Money(1)); //Assert actual.Should().Be(new Money(0.32)); }
public void ShouldFetaCheeseCalculateCostAs32Percent() { //Arrange ITopping subject = Topping.FetaCheese; //Act Money actual = subject.Cost(new Money(1)); //Assert actual.Should().Be(new Money(0.32)); }
public static Drink OrderDrink(DrinkType drinkType, ITopping topping) { Drink drink = null; switch (drinkType) { case DrinkType.Expresso: drink = new Expresso(topping.HasSugar, topping.HasMilk, topping.HasChocolate); break; case DrinkType.Tea: drink = new Tea(topping.HasSugar); break; case DrinkType.IceTea: drink = new IceTea(topping.HasSugar); break; default: throw new NotSupportedException(); } return(drink); }
public void OneTimeSetup() { mockDataStore = new Mock <ITempDataStore>(); toppingService = new ToppingService(mockDataStore.Object); }
public void AddToppingToCup(ITopping toppingToAdd) { CupOfToppings.Add(toppingToAdd); }
public IPizza AddTopping(ITopping topping) => _type.Create(_toppings.Add(topping));
public IPizza RemoveTopping(ITopping topping) => _type.Create(_toppings.Remove(topping));
public void AddSaladTopping(ITopping topping) { _saladDecorator.AddTopping(topping); }
public ICalzone AddTopping(ITopping topping) => _type.Create(_toppings.Add(topping));
public ICalzone RemoveTopping(ITopping topping) => _type.Create(_toppings.Remove(topping));
public void AddTopping(ITopping topping) => toppings.Add(topping);
public IToppingable AddTopping(ITopping topping) { _ingredients.Add(topping); return(this); }
public ToppingManager(IItemService <Item> itemService, ITopping toppingService) { this.itemService = itemService; this.toppingService = toppingService; }