Exemplo n.º 1
0
        public void AddMultipleFoodItemsToList()
        {
            OrderList orderList = new OrderList();

            orderList.AddStarter(StarterMenu.Chips);
            orderList.AddStarter(StarterMenu.HotWings);
            orderList.AddMain(MainMenu.CheeseBurger);
            orderList.AddMain(MainMenu.CheeseBurger);
            orderList.AddMain(MainMenu.PepperoniPizza);
            Assert.AreEqual(5, orderList.GetCountOfItems());
        }
Exemplo n.º 2
0
        public void StarterPriceIsReturned()
        {
            OrderList orderList = new OrderList();

            orderList.AddStarter(StarterMenu.Chips);
            Assert.AreEqual(4.40, orderList.GetList()[0].Price);
        }
Exemplo n.º 3
0
        public void AddStarterToList()
        {
            OrderList orderList = new OrderList();

            orderList.AddStarter(StarterMenu.Chips);
            Assert.AreEqual(1, orderList.GetCountOfItems());
        }
Exemplo n.º 4
0
        public void DeletingMultipleFoodItemsFromList()
        {
            OrderList orderList = new OrderList();

            orderList.AddStarter(StarterMenu.Chips);
            orderList.AddStarter(StarterMenu.Chips);
            orderList.AddMain(MainMenu.CheeseBurger);
            orderList.AddMain(MainMenu.CheeseBurger);
            orderList.AddMain(MainMenu.CheeseBurger);
            orderList.AddMain(MainMenu.CheeseBurger);

            orderList.DeleteStarter(StarterMenu.Chips);
            orderList.DeleteMain(MainMenu.CheeseBurger);
            orderList.DeleteMain(MainMenu.CheeseBurger);
            Assert.AreEqual(3, orderList.GetCountOfItems());
        }
Exemplo n.º 5
0
        public void DeleteStarterFromList()
        {
            OrderList orderList = new OrderList();

            orderList.AddStarter(StarterMenu.Chips);
            orderList.DeleteStarter(StarterMenu.Chips);
            Assert.AreEqual(0, orderList.GetCountOfItems());
        }
Exemplo n.º 6
0
        public void UpdateStarter()
        {
            OrderList orderList = new OrderList();

            orderList.AddStarter(StarterMenu.Chips);
            orderList.UpdateStarter(StarterMenu.Chips, StarterMenu.HotWings);
            Assert.AreEqual(1, orderList.GetCountOfItems());
            Assert.AreEqual(StarterMenu.HotWings, orderList.GetList()[0].Meal);
        }
Exemplo n.º 7
0
        public void GetTotalOfOneStarter()
        {
            OrderList orderList = new OrderList();

            orderList.AddStarter(StarterMenu.Chips);
            Till till = new Till(orderList);

            Assert.AreEqual("�40", till.GetTotalFromList());
        }
Exemplo n.º 8
0
        public void GetTotalOfMultipleFoodItems(int numOfStarters, int numOfMains, string expectedCost)
        {
            OrderList orderList = new OrderList();

            for (int i = 0; i < numOfStarters; i++)
            {
                orderList.AddStarter(StarterMenu.Chips);
            }

            for (int i = 0; i < numOfMains; i++)
            {
                orderList.AddMain(MainMenu.CheeseBurger);
            }

            Till till = new Till(orderList);

            Assert.AreEqual(expectedCost, till.GetTotalFromList());
        }