public void AddCart() { mock.Setup(x => x.Carts); ServiceCart serviceCart = new ServiceCart(mock.Object); serviceCart.GetAddToCart(null); }
public RedirectToRouteResult AddToCart(int itemId, string returnUrl) { ItemDTO getItem = serviceItem.GetItem(itemId); ServiceCart cart = serviceCart.GetCart(this.HttpContext); cart.GetAddToCart(getItem); return(RedirectToAction("DisplayCart", new { returnUrl })); }