예제 #1
0
        public decimal CalculateGroupPrice()
        {
            var discount = _discountCalculator.DiscountToApply(_books);

            return(_books.Sum(x => x.Price - ((x.Price * discount) / 100)));
        }
예제 #2
0
 public void CalculatePrice_ZeroOrderItems()
 {
     _discountCalculator.DiscountToApply(new List <Book>()).Should().Be(0);
 }