Esempio n. 1
0
        public void NoDiscountForOneItem()
        {
            Item[] listofItem = new Item[1];
            listofItem[0] = new Item("1001", "1001.1", 99.50);

            order o = new order();

            double totalBill = o.totalbill(listofItem);

            Assert.AreEqual(listofItem[0].cost, totalBill);
        }
Esempio n. 2
0
        public void DiscountFor2ndItemSameStyle()
        {
            Item[] listofItem = new Item[2];
            listofItem[0] = new Item("1001", "1001.1", 10.00);
            listofItem[1] = new Item("1001", "1001.2", 100.00);

            order o = new order();

            double totalBill = o.totalbill(listofItem);

            Assert.AreEqual(60, totalBill);
        }