예제 #1
0
        public void AddItemToBasket_VerifyOfferCalculator()
        {
            BasketManager bm = new BasketManager(gm);

            bm.AddNewItem("B", 1);
            Assert.AreEqual(bm.GetTotalBasket(), 3);

            bm.AddNewItem("A", 1);
            Assert.AreEqual(bm.GetTotalBasket(), 8);

            bm.AddNewItem("B", 1);
            Assert.AreEqual(bm.GetTotalBasket(), 9.5);
        }
예제 #2
0
        public void AddItemToBasket_QuantityOffer()
        {
            BasketManager bm = new BasketManager(gm);

            bm.AddNewItem("A", 3);
            Assert.AreEqual(bm.GetTotalBasket(), 13);
        }
예제 #3
0
        public void AddItemToBasket_MultiQuantityOfferPlusOne()
        {
            BasketManager bm = new BasketManager(gm);

            bm.AddNewItem("A", 7);
            Assert.AreEqual(bm.GetTotalBasket(), 31);
        }
예제 #4
0
        public void AddItemToBasket()
        {
            BasketManager bm = new BasketManager(gm);

            bm.AddNewItem("B", 1);
            Assert.AreEqual(bm.GetTotalBasket(), 3);
        }