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.Apply(products); var severalDiscountsApplied = 1.65m; Assert.Equal(new Money(severalDiscountsApplied), discount); }
public Money Total() { return(_products.Cost() - _discounts.Apply(_products)); }