예제 #1
0
        public void Get_Discount_Price_For_One_Item_Is_Equal_To_Item_Price()
        {
            List <ItemPile> basket = new List <ItemPile>();

            basket.Add(new ItemPile(new StockKeepingUnit("A", 50), 1));

            decimal result = _pricing.GetDiscountedPrice(basket);

            result.Should().Be(50);
        }
예제 #2
0
        public decimal GetTotalPrice()
        {
            decimal totalPrice = 0;

            try
            {
                totalPrice = _pricing.GetDiscountedPrice(_basket);
            }
            catch (Exception e)
            {
                throw; //TODO: logging
            }

            return(totalPrice);
        }