public CartTests() { Milk = new Product("Milk", 1.0m); Bread = new Product("Bread", 1.5m); Apples = new Product("Apples", 1.25m); DiscountStore = Substitute.For <IDiscountStore>(); Sut = new Cart(DiscountStore); DiscountStore.GetDiscounts().Returns(new List <Discount>()); }
public Cart(IDiscountStore discountStore) { _discountStore = discountStore ?? throw new ArgumentNullException(nameof(discountStore)); }