Ejemplo n.º 1
0
        public void TestOrderPizza()
        {
            IPizza pizza1 = Pizza.OrderPizza(SizesEnum.MeduimSize);

            pizza1 = Pizza.AddCrust(pizza1, CrustsEnums.Thin);
            pizza1 = Pizza.AddTopping(pizza1, ToppingsEnums.Bacon);
            Assert.AreEqual(Pizza.Totalprice(pizza1), 7.85M);
        }
Ejemplo n.º 2
0
        public void TestpizzaCreatedByName()
        {
            IPizza pizza1 = Pizza.OrderPizza(SizesEnum.MeduimSize);

            pizza1 = Pizza.AddCrust(pizza1, CrustsEnums.Thin);
            pizza1 = Pizza.AddTopping(pizza1, ToppingsEnums.Bacon);



            Assert.AreEqual(Pizza.pizzaCreatedByName(pizza1), "Meduim pizza Thin with Bacon Topping");
        }
Ejemplo n.º 3
0
        public void TestRemovePizza()
        {
            Orders OrderTest = new Orders();
            IPizza pizza1    = Pizza.OrderPizza(SizesEnum.MeduimSize);

            pizza1 = Pizza.AddCrust(pizza1, CrustsEnums.Thin);
            pizza1 = Pizza.AddTopping(pizza1, ToppingsEnums.Bacon);
            IPizza pizza2 = Pizza.OrderPizza(SizesEnum.MeduimSize);

            OrderTest.AddPizza(pizza1);
            OrderTest.AddPizza(pizza2);
            OrderTest.RemovePizza(pizza1);
            Assert.AreEqual(OrderTest.getTotalPriceOrder(), 5.00M);
        }
Ejemplo n.º 4
0
        public void TestAddPizza()
        {
            Orders OrderTest = new Orders();
            IPizza pizza1    = Pizza.OrderPizza(SizesEnum.MeduimSize);

            pizza1 = Pizza.AddCrust(pizza1, CrustsEnums.Thin);
            pizza1 = Pizza.AddTopping(pizza1, ToppingsEnums.Bacon);
            IPizza pizza2 = Pizza.OrderPizza(SizesEnum.MeduimSize);

            OrderTest.AddPizza(pizza1);
            OrderTest.AddPizza(pizza2);

            Assert.IsTrue(OrderTest.getPizzasInOrder().Count == 2);
        }