Exemplo n.º 1
0
        public decimal CalculateGroupPrice()
        {
            var discount = _discountCalculator.DiscountToApply(_books);

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