Exemple #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());
        }
Exemple #2
0
        public void GetTotalOfOneMainAfterDelete()
        {
            OrderList orderList = new OrderList();

            orderList.AddMain(MainMenu.CheeseBurger);
            orderList.AddMain(MainMenu.PepperoniPizza);

            Till till = new Till(orderList);

            orderList.DeleteMain(MainMenu.PepperoniPizza);
            Assert.AreEqual("�00", till.GetTotalFromList());
        }
Exemple #3
0
        public void MainPriceIsReturned()
        {
            OrderList orderList = new OrderList();

            orderList.AddMain(MainMenu.CheeseBurger);
            Assert.AreEqual(7.00, orderList.GetList()[0].Price);
        }
Exemple #4
0
        public void AddMainToList()
        {
            OrderList orderList = new OrderList();

            orderList.AddMain(MainMenu.CheeseBurger);
            Assert.AreEqual(1, orderList.GetCountOfItems());
        }
Exemple #5
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());
        }
Exemple #6
0
        public void DeleteMainFromList()
        {
            OrderList orderList = new OrderList();

            orderList.AddMain(MainMenu.CheeseBurger);
            orderList.DeleteMain(MainMenu.CheeseBurger);
            Assert.AreEqual(0, orderList.GetCountOfItems());
        }
Exemple #7
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);
        }
Exemple #8
0
        public void GetTotalOfOneMain()
        {
            OrderList orderList = new OrderList();

            orderList.AddMain(MainMenu.CheeseBurger);
            Till till = new Till(orderList);

            Assert.AreEqual("�00", till.GetTotalFromList());
        }
Exemple #9
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());
        }