public void apply_all_individual_discounts() { Products products = new Products(); AddProduct(products, new Butter(2)); AddProduct(products, new Bread(1)); AddProduct(products, new Milk(4)); Money discount = _discounts.ApplyTo(products); var severalDiscountsApplied = new Money(1.65m); Assert.Equal(severalDiscountsApplied, discount); }
public Money Total() { return(_products.TotalCost() - _discounts.ApplyTo(_products)); }