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

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

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

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

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

            Assert.AreEqual("�40", till.GetTotalFromList());
        }
Beispiel #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());
        }
Beispiel #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());
        }
Beispiel #6
0
        public void DecimalConvertedToPounds(decimal total, string poundValue)
        {
            Till till = new Till(new OrderList());

            Assert.AreEqual(poundValue, till.convertToPounds(total));
        }