public ShoppingCart Get() { var cart = new ShoppingCart(); var itemrandomizer = new Random(); var randomizer = new Random(); var random = randomizer.Next(0,20); for (var i = 0; i < random; i++) { var itemId = itemrandomizer.Next(1, 5); cart.Add(_products.FirstOrDefault(x => x.Id == itemId)); } return cart; }
public VolumeDiscountStrategyOld(ShoppingCart cart) { _cart = cart; }
public PricingCalculator(ShoppingCart cart, IDiscountStrategy discountStrategy) { _cart = cart; _discountStrategy = discountStrategy; }