public void AddToMenu() { Console.WriteLine("What is the number of the product you'd like to buy?"); string mealAsString = Console.ReadLine(); int number = int.Parse(mealAsString); Console.WriteLine("What is name of the meal you want", "fettucine", "pizza", "macaroni"); string name = Console.ReadLine(); Console.WriteLine("Description of meal"); string descript = Console.ReadLine(); Console.WriteLine(descript); Console.WriteLine("Meal ingredients"); string ingredients = Console.ReadLine(); Console.WriteLine("Meal price"); string price = Console.ReadLine(); Console.WriteLine(price); Menu fullConstructor = new Menu(number, name, ingredients, descript, price); _menuList.AddToMenu(fullConstructor); Console.WriteLine("Please hit any key to continue."); Console.ReadKey(); }
public void AddMethod() { Menu_Repository _menuList = new Menu_Repository(); Menu content = new Menu(); _menuList.AddToMenu(content); Assert.AreEqual(1, _menuList.GetMenu().Count); }