Exemple #1
0
        public void GetTotalOfEmptyList()
        {
            OrderList orderList = new OrderList();
            Till      till      = new Till(orderList);

            Assert.AreEqual("�00", till.GetTotalFromList());
        }
Exemple #2
0
        public void GetTotalOfOneMain()
        {
            OrderList orderList = new OrderList();

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

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

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

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