//Seed Method private void SeedMenuList() { MenuContent chickenStrips = new MenuContent(1, "Chicken Strips", "3 chicken strips with fries and a drink", "Three chicken strips, Side of fries, Choice of beverage", 5.99m); MenuContent cheeseBurger = new MenuContent(2, "CheeseBurger", "Quarterpound cheeseburger with fries and a drink", "Quarterpound all beef patty, Slice of American Cheese, Toasted Kaiser bun, Choice of toppings, Side of fries, Choice of beverage", 6.99m); MenuContent burritoSupreme = new MenuContent(3, "Burrito Supreme", "Supreme burrito with side of rice and a drink", "Rice, Beans, Choice of chicken or beef, Shredded lettuce, Diced tomatoes, Sourcream, Flour tortilla shell, Side of rice, Choice of beverage", 5.99m); _testMenu.AddContentToMenu(chickenStrips); _testMenu.AddContentToMenu(cheeseBurger); _testMenu.AddContentToMenu(burritoSupreme); }
private void CreateNewMenuItem() { Console.Clear(); MenuContent newMenuItem = new MenuContent(); Console.WriteLine("Enter the menu number:"); newMenuItem.MealNumber = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter meal name:"); newMenuItem.MealName = Console.ReadLine(); Console.WriteLine("Enter meal description:"); newMenuItem.Description = Console.ReadLine(); Console.WriteLine("Enter all meal ingredients (separated by commas):"); newMenuItem.Ingredients = Console.ReadLine(); Console.WriteLine("Enter price (do not enter $, just numbers):"); newMenuItem.Price = Convert.ToDecimal(Console.ReadLine()); _menuRepo.AddContentToMenu(newMenuItem); }
public void AddToMenu_ShouldGetCoorectBool() { //Arrange Menu content = new Menu(); MenuRepository repo = new MenuRepository(); //Act bool addResult = repo.AddContentToMenu(content); //Assert Assert.IsTrue(addResult); }
public void DeleteMenuContent_ShouldDeleteSelectedContent() { //Arrange Menu content = new Menu(1, "burger", "burger", "burger", 4.99m); MenuRepository repo = new MenuRepository(); repo.AddContentToMenu(content); //Act bool removeResult = repo.DeleteMenuItems(content); //Assert Assert.IsTrue(removeResult); }
public void GetAllMenuContent_ShouldReturnAllContent() { //Arrange Menu content = new Menu(); MenuRepository repo = new MenuRepository(); repo.AddContentToMenu(content); //Act List <Menu> menus = repo.GetAllMenuContent(); bool thereIsSomethingHere = menus.Contains(content); //Assert Assert.IsTrue(thereIsSomethingHere); }