Пример #1
0
        private void CreatePizzaByName(string name)
        {
            PizzaStore pz    = new PizzaStore(new PizzaFactory());
            var        pizza = pz.GetPizza(name);

            Assert.IsNotNull(pizza);
            Assert.AreEqual(name, pizza.Name);
        }
Пример #2
0
        public void TestCreateNWFactory()
        {
            PizzaStore pz    = new PizzaStore(new NYPizzaFactory());
            var        pizza = pz.GetPizza("NYCheese");

            Assert.IsNotNull(pizza);
            Assert.AreEqual("NYCheese", pizza.Name);
        }