public static void Start() { PizzaStore pizzaStore = new NYPizzaStyleStore(); pizzaStore.OrderPizza(PizzaType.Cheese); "----------------------".P(); pizzaStore = new ChicagoPizzaStore(); pizzaStore.OrderPizza(PizzaType.Cheese); }
public void FactoryTest() { PizzaStore store = new ChicagoPizzaStore(); var target = store.CreatePizza(PizzaType.Cheese); Assert.IsTrue(target is CheesePizza); Assert.AreEqual(target.Name, "Chicago Style Cheese Pizza"); store = new NYPizzaStyleStore(); target = store.CreatePizza(PizzaType.Cheese); Assert.IsTrue(target is CheesePizza); Assert.AreEqual(target.Name, "New York Style Cheese Pizza"); }
public void NYPizzaStoreTest() { PizzaStore store = new NYPizzaStyleStore(); store.OrderPizza(PizzaType.Cheese); Assert.AreEqual(_verifyResult, "Preparing: New York Style Cheese PizzaBake for 25 minutes at 350Cutting the pizza into square slicesPlace pizza in official PizzaStore box"); _verifyResult = String.Empty; store.OrderPizza(PizzaType.Clam); Assert.AreEqual(_verifyResult, "Preparing: New York Style Clam PizzaBake for 25 minutes at 350Cutting the pizza into square slicesPlace pizza in official PizzaStore box"); }