public ActionResult ExportBasketToZip(string cartId)
        {
            var cartItems = _cartItemService.GetCart(cartId);

            var documentIds = (from c in cartItems select c.Document.DocumentId).ToList();

            var zipFilePath = this._exportFileService.ExportToZip(documentIds);

            documentIds.ForEach(x => this._cartItemService.RemoveItem(x, cartId));

            return(this.Json(new { file = zipFilePath }));
        }
Example #2
0
        public void GivenACartId_WhenIAskToGetAllItemsInTheCart_IGetAllItemsInTheCart()
        {
            _cartItemService.GetCart(It.IsAny <string>());

            _cartItemRepository.Verify(s => s.GetCart(It.IsAny <string>()), Times.Once());
        }