public void RemoveLines_no_this_type_of_menu_items() { //Arrange var cart = new Cart(); var testMenuItem = new MenuItem(); //Act cart.RemoveLine(testMenuItem); }
public RedirectToRouteResult RemoveFromCart(Cart cart, int menuItemId, string returnUrl) { var menuItem = _baseDataAccess.GetMenuItems() .FirstOrDefault(m => m.Id == menuItemId); if (menuItem != null) { cart.RemoveLine(menuItem); } return RedirectToAction("Index", new { returnUrl }); }