//Create New Menu Items private void AddFoodToMenu() { Console.Clear(); Menu newMenu = new Menu(); //Meal Name Console.WriteLine("What should we call this meal?"); newMenu.MealName = Console.ReadLine(); //Meal Number Console.WriteLine("Assign meal a number"); string mealNumberAsString = Console.ReadLine(); newMenu.MealNumber = int.Parse(mealNumberAsString); //Description Console.WriteLine("What is in this meal?"); newMenu.Description = Console.ReadLine(); //Ingredients Console.WriteLine("But what is this made of?"); newMenu.Ingredients = Console.ReadLine(); //Price Console.WriteLine("How much is this going to cost?"); string priceAsString = Console.ReadLine(); newMenu.Price = double.Parse(priceAsString); _menuRepo.AddFoodToMenu(newMenu); }
public void AddFoodToMenu_ShouldGetCorrectBoolean() { //Arrange Menu food = new Menu(); MenuRepo repo = new MenuRepo(); //Act bool addResult = repo.AddFoodToMenu(food); //Assert Assert.IsTrue(addResult); }
public void GetMealByNumber_ShouldReturnMenu() { //Arrange Menu meal = new Menu(); MenuRepo repo = new MenuRepo(); meal = new Menu("Bacon Lovers Delight", 1, "Bacon Stuffed Bacon Cheeseburger served with side of Bacon", "Bacon, Beef, Cheddar Cheese, Kaiser Roll, More Bacon!", 9.49); repo.AddFoodToMenu(meal); //Act Menu searchResult = repo.GetByMealNumber(1); //Assert Assert.AreEqual(meal, searchResult); }
public void ViewMenu_ShouldReturnMenu() { //Arrange Menu food = new Menu(); MenuRepo repo = new MenuRepo(); repo.AddFoodToMenu(food); //Act List <Menu> foods = repo.ViewMenu(); bool menuHasFood = foods.Contains(food); //Assert Assert.IsTrue(menuHasFood); }
public void Arrange() { _repo = new MenuRepo(); _meal = new Menu("Bacon Lovers Delight", 1, "Bacon Stuffed Bacon Cheeseburger served with side of Bacon", "Bacon, Beef, Cheddar Cheese, Kaiser Roll, More Bacon!", 9.49); _repo.AddFoodToMenu(_meal); }