Ejemplo n.º 1
0
        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>());
        }
Ejemplo n.º 2
0
 public Cart(IDiscountStore discountStore)
 {
     _discountStore = discountStore ?? throw new ArgumentNullException(nameof(discountStore));
 }