Ejemplo n.º 1
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.º 2
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);
        }