public void RemoveItemShouldReduceListCount() { _repo.RemoveItemFromList(1); int expected = 2; int actual = _repo.GetMenuItems().Count; Assert.AreEqual(expected, actual); }
//Delete items dialog private void RemoveItem() { //Display options for removal DisplayAllItems(); //Get item they want to delete Console.WriteLine("Enter the item # you'd like to remove: "); string menuNumAsString = Console.ReadLine(); int input = int.Parse(menuNumAsString); //Call the delete method bool wasDeleted = _menuItemsRepo.RemoveItemFromList(input); //If deleted, say so //Otherwise say it could not be deleted if (wasDeleted) { Console.WriteLine("Item was sucessfully removed"); } else { Console.WriteLine("Item could not be removed"); } }