public void AddMenuItem_ShouldReturnTrue() { var newMenuItem = new MenuItem(); bool addedSuccessfully = _repository.AddMenuItem(newMenuItem); Assert.IsTrue(addedSuccessfully); }
private void AddMenuItem() { MenuItem newItem = new MenuItem(); _console.WriteLine("\n--------------------------------------------------\n" + "\tAdd Menu Item.\n" + "--------------------------------------------------\n"); GetNewItemNumber(ref newItem); GetNewItemName(ref newItem); GetNewItemDescription(ref newItem); GetNewItemIngredients(ref newItem); GetNewItemPrice(ref newItem); var added = _menuItemRepository.AddMenuItem(newItem); if (added) { _console.WriteLine("\nMenu Item Added Successfully!!!\n"); } else { _console.WriteLine("\nFailed to add Menu Item\n"); } ReturnOrQuit(); }
public void Arrange() { _menuItem = new MenuItem( 1, "Turkish Coffee", "Authentic Turkish Coffee", new List <string> { "1 cup water (cold)", "1 tablespoon extra finely ground coffee (powder consistency)", "1/8 teaspoon ground cardamom (or 1 cardamom pod, crushed)", "Optional: 1 teaspoon sugar (or more, to taste)" }, 10.5m ); _repository = new MenuItemRepository(); _repository.AddMenuItem(_menuItem); _repository.AddMenuItem( new MenuItem( 2, "Pumpkin Spice Latte", "Pumpkin spice latte is the fall drink we love (or sometimes just love to hate).", new List <string> { "1 cup milk", "2 tablespoons unsweetened pumpkin puree.", "1 tablespoon sugar, or to taste.", "1 teaspoon ground cinnamon.", "1/2 teaspoon ground ginger.", "1/4 teaspoon ground nutmeg.", "1/8 teaspoon ground cloves.", "1/2 teaspoon vanilla", "1/2 cup brewed espresso (or very strongly brewed coffee).", "Sweetened whipped cream, for topping" }, 12.5m ) ); _repository.AddMenuItem( new MenuItem( 3, "Cafe Late", "An Italian-style cafe latte", new List <string> { "1 tablespoon coffee", "1 fluid ounce water", "Optional: 1 1/2 fluid ounces (or 1 shot) of flavored simple syrup", "3 fluid ounces milk (or more)" }, 8.5m ) ); }