public void CartController_GetCartTotal_ReturnsBadResponse() { //clear out cart _cart.GetAllItems().ToList().ForEach(x => _cart.Remove(x)); var badResponse = _controller.GetCartTotal(); Assert.IsType <BadRequestObjectResult>(badResponse.Result); }
public ActionResult Remove(string itemName) { BogoPromotion existingItem = _bogos.GetItem(itemName); if (existingItem == null) { return(NotFound()); } _bogos.Remove(existingItem); return(Ok()); }
public ActionResult Remove(string itemName) { CartItem existingItem = _cart.GetItem(itemName); if (existingItem == null) { return(NotFound()); } _cart.Remove(existingItem); return(Ok()); }
public ActionResult Remove(string itemName) { StoreItem existingItem = _store.GetItem(itemName); if (existingItem == null) { return(NotFound()); } _store.Remove(existingItem); return(Ok()); }
public ActionResult Remove(string itemName) { MarkdownPromotion existingItem = _markdowns.GetItem(itemName); if (existingItem == null) { return(NotFound()); } _markdowns.Remove(existingItem); return(Ok()); }