Esempio n. 1
0
        public void MainPriceIsReturned()
        {
            OrderList orderList = new OrderList();

            orderList.AddMain(MainMenu.CheeseBurger);
            Assert.AreEqual(7.00, orderList.GetList()[0].Price);
        }
Esempio n. 2
0
        public void StarterPriceIsReturned()
        {
            OrderList orderList = new OrderList();

            orderList.AddStarter(StarterMenu.Chips);
            Assert.AreEqual(4.40, orderList.GetList()[0].Price);
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
        public void UpdateMain()
        {
            OrderList orderList = new OrderList();

            orderList.AddMain(MainMenu.CheeseBurger);
            orderList.UpdateMain(MainMenu.CheeseBurger, MainMenu.SteakChips);
            Assert.AreEqual(1, orderList.GetCountOfItems());
            Assert.AreEqual(MainMenu.SteakChips, orderList.GetList()[0].Meal);
        }
Esempio n. 5
0
        public string GetTotalFromList()
        {
            decimal total = 0;

            foreach (var item in _orderList.GetList())
            {
                total += item.Price;
            }

            return(convertToPounds(total));
        }