Example #1
0
        public void Execute()
        {
            var productsLocalCopy = ShoppingCartFakeRepository.GetAll().ToList();

            foreach (var productLocalCopy in productsLocalCopy)
            {
                ProductFakeRepository.IncreaseStockById(productLocalCopy.Product.Id, productLocalCopy.Quantity);

                ShoppingCartFakeRepository.RemoveAll(productLocalCopy.Product.Id);
            }
        }
Example #2
0
 public bool CanExecute()
 {
     return(ShoppingCartFakeRepository.GetAll().Any());
 }