public List <Product> GetAvailableItems() { var availableItems = _superMarketRepo.DisplayAvailableItems(); return(availableItems.Select(x => new Product { Sku = x.Sku, Description = x.Description, UnitPrice = x.UnitPrice }).ToList()); }
public void ItGetsAllAvailableItems() { //Arrange //Act var availableItems = _repo.DisplayAvailableItems(); //Assert Assert.IsNotNull(availableItems); }
public ItemPriceRuleFactory(ISuperMarketData superMarketRepo) { _superMarketRepo = superMarketRepo; _itemCodePriceMap = _superMarketRepo.DisplayAvailableItems().ToDictionary(x => x.Sku, x => x.UnitPrice); }