public void MakeMeatPizza() { //requirement: An order can only have 50 pizza's if (ValidateUnderPizzaLimit()) { Pizzas.Add(_pizzaFactory.Make <MeatPizza>()); } ValidateUnderPriceLimit(); }
public void MakeAPizzaMeat(AItemModel C, AItemModel S, List <Toppings> T) { Pizzas.Add(_pizzaFactory.Make <PizzaMeat>()); Pizzas.Last().Crust = (Crust)C; Pizzas.Last().Size = (Size)S; Pizzas.Last().PizzaToppings = T; var tp = T.Sum(x => x.ItemPrice); Pizzas.Last().CalculatePrice(tp); }
public void TestMeatPizzaExists() { // create var MeatTest = PizzaFactory.Make <MeatPizza>(); // act var Actual = MeatTest; // assert Assert.IsType <MeatPizza>(Actual); Assert.NotNull(Actual); }
public Pizza Pizza(string userName, string type, string crust, string size, float price) { Pizza pizza = _pizzaFactory.Make <Pizza>(); pizza.Name = type; pizza.Crust = crust; pizza.Size = size; pizza.Price = price; pizza.OrderName = userName; return(pizza); }
private void Test_PizzaFactory_Works() { // arrange var sut = new GenericPizzaFactory(); // act var actual = sut.Make <VeggiePizza>(); // assert Assert.IsType <VeggiePizza>(actual); Assert.NotNull(actual); }
public void MakeMeatPizza() { Pizzas.Add(_pizzaFactory.Make <MeatPizza>()); }
public void MakePizza() { Pizzas.Add(pizzaFactory.Make <Pizza>()); }
public void AddPizza() { var choice = (SelectPizza()); if (choice == 1) { // check to see if amount of pizza is less than 50 if (Pizzas.Count < 25) { APizzaModel p = _pizzaFactory.Make <PepperoniPizza>(); p.OrderId = EntityId; Pizzas.Add(p); System.Console.WriteLine("Pepperoni Pizza Added to Order"); AddPizza(); Total = Total + 10; } else { Console.WriteLine("Max Order amount reached"); } } else if (choice == 2) { if (Pizzas.Count < 25) { APizzaModel p = _pizzaFactory.Make <FourCheesePizza>(); p.OrderId = EntityId; Pizzas.Add(p); System.Console.WriteLine("Four Cheese Pizza Added to Order"); AddPizza(); Total = Total + 10; } else { Console.WriteLine("Max Order amount reached"); } } else if (choice == 3) { if (Pizzas.Count < 25) { APizzaModel p = _pizzaFactory.Make <VeggiePizza>(); p.OrderId = EntityId; Pizzas.Add(p); System.Console.WriteLine("Veggie Pizza Added to Order"); AddPizza(); Total = Total + 10; } else { Console.WriteLine("Max Order amount reached"); } } else if (choice == 4) { if (Pizzas.Count < 25) { APizzaModel p = _pizzaFactory.Make <MeatPizza>(); p.OrderId = EntityId; Pizzas.Add(p); System.Console.WriteLine("Meat Pizza Added to Order"); AddPizza(); Total = Total + 10; } else { Console.WriteLine("Max Order amount reached"); } } else if (choice == 5) { if (Pizzas.Count < 25) { APizzaModel p = _pizzaFactory.Make <MeatPizza>(); p.OrderId = EntityId; p.Size = "Large"; Pizzas.Add(p); System.Console.WriteLine("Meat Pizza Added to Order"); AddPizza(); Total = Total + 10; } else { Console.WriteLine("Max Order amount reached"); } } else if (choice == 6) { if (Pizzas.Count < 25) { APizzaModel p = _pizzaFactory.Make <PepperoniPizza>(); p.OrderId = EntityId; Pizzas.Add(p); System.Console.WriteLine("Pepperoni Pizza Added to Order"); AddPizza(); Total = Total + 10; } else { Console.WriteLine("Max Order amount reached"); } } else if (choice == 7) { if (Pizzas.Count < 25) { APizzaModel p = _pizzaFactory.Make <FourCheesePizza>(); p.OrderId = EntityId; Pizzas.Add(p); System.Console.WriteLine("Four Cheese Added to Order"); AddPizza(); Total = Total + 10; } else { Console.WriteLine("Max Order amount reached"); } } else if (choice == 8) { if (Pizzas.Count < 25) { APizzaModel p = _pizzaFactory.Make <VeggiePizza>(); p.OrderId = EntityId; Pizzas.Add(p); System.Console.WriteLine("Veggie Added to Order"); AddPizza(); Total = Total + 10; } else { Console.WriteLine("Max Order amount reached"); } } else if (choice == 0) { System.Console.WriteLine("Finished Ordering.."); } else { System.Console.WriteLine("Choose a valid option"); AddPizza(); } }
public void MakeMeatPizza() { Pizzas.Add(_pizzaFactory.Make <MeatPizza>()); OrderPrice += 30.00M; }
public void MakeMeatPizza(List <Crust> availCrusts, List <Size> availSizes, List <Topping> availToppings) { Pizzas.Add(_pizzaFactory.Make <MeatPizza>()); AddMajorPizzaParts(Pizzas.Last(), availCrusts, availSizes, availToppings); }
public void MakeMeatPizza(Size size, string crust) { Pizzas.Add(_pizzaFactory.Make <MeatPizza>(size, crust)); }