public Checkout(ICheckoutFactory checkoutFactory, ISuperMarketData superMarketRepo) { _scannedItems = new List <string>(); _checkoutFactory = checkoutFactory; _superMarketRepo = superMarketRepo; //_itemPriceRules = itemPriceRules; //_checkoutFactory.CreateCheckout(); }
public void Setup() { _repo = new Mock <ISuperMarketData>(); _itemPriceRuleFactory = new Mock <IItemPriceRuleFactory>(); _factory = new Factory.CheckoutFactory(_itemPriceRuleFactory.Object, _repo.Object); _products = new List <ProductDto> { new ProductDto { Sku = "A99", UnitPrice = 0.50m }, new ProductDto { Sku = "B15", UnitPrice = 0.30m }, new ProductDto { Sku = "C40", UnitPrice = 1.80m }, new ProductDto { Sku = "T23", UnitPrice = 0.99m }, }; }
public void Setup() { _factory = new CheckoutFactory(); }