private void SeedContent() { MenuItem cheeseBurger = new MenuItem( "Cheese Burger", "A simple classic", 1, 5, "Beef, Cheese, Bread" ); MenuItem blt = new MenuItem( "Bacon Lettuce Tomato", "God's gift.", 2, 6, "Bacon, Lettuce, Bread, Tomato" ); MenuItem milkShake = new MenuItem( "Milk Shake", "Delicious", 7, 2, "Lots of things you cant read outloud correctly." ); _repo.AddContentToDirectory(milkShake); _repo.AddContentToDirectory(cheeseBurger); _repo.AddContentToDirectory(blt); }
public void AddContentToDirectory_ShouldGetCorrectBool() { Menu content = new Menu(); MenuRepository repo = new MenuRepository(); bool addResult = repo.AddContentToDirectory(content); Assert.IsTrue(addResult); }
public void GetDirectory_ShouldReturnCorrectList() { Menu testContent = new Menu(); MenuRepository repo = new MenuRepository(); repo.AddContentToDirectory(testContent); List <Menu> testList = repo.GetContent(); bool directoryHasContent = testList.Contains(testContent); Assert.IsTrue(directoryHasContent); }
public void AddToDirectory_ShouldGetCorrectBoolean() { //Arrange MenuContent content = new MenuContent(); MenuRepository repository = new MenuRepository(); //Act bool addResult = repository.AddContentToDirectory(content); //Assert Assert.IsTrue(addResult); }
public void GetByTitle_ShouldReturnCorrectContent() { //Arrange MenuRepository repo = new MenuRepository(); MenuContent newContent = new MenuContent("Cheese Burger", "A simple classic", 1, 5, "Beef, Cheese, Bread"); repo.AddContentToDirectory(newContent); string title = "Cheese Burger"; //Act MenuContent searchResult = repo.GetContentByTitle(title); //Assert Assert.AreEqual(searchResult.MealName, title); }
public void DeleteExistingContent_ShouldReturnTrue() { //Arrange MenuRepository repo = new MenuRepository(); MenuContent content = new MenuContent("Cheese Burger", "A simple classic", 1, 5, "Beef, Cheese, Bread"); repo.AddContentToDirectory(content); //Act MenuContent oldContent = repo.GetContentByTitle("Cheese Burger"); bool removeResult = repo.DeleteExistingContent(oldContent); //Assert Assert.IsTrue(removeResult); }
public void GetDirectory_ShouldReturnCorrectCollection() { //Arrange MenuContent content = new MenuContent(); MenuRepository repo = new MenuRepository(); repo.AddContentToDirectory(content); //Act List <MenuContent> contents = repo.GetContents(); bool directoryHasContent = contents.Contains(content); //Assert Assert.IsTrue(directoryHasContent); }
private void CreateMenu() //Change color to green and create content { MenuContent content = new MenuContent(); Console.ForegroundColor = ConsoleColor.Green; // public Menu(int mealNumber, string title, string description, double price) //just listing the data needed to sent in Console.WriteLine("ENTER THE MENU NUMBER. \n"); //ASK FOR (Meal Number) content.MealNumber = Int32.Parse(Console.ReadLine()); Console.WriteLine("ENTER THE MEAL NAME \n"); //ASK FOR (Meal Name) content.MealName = Console.ReadLine(); Console.WriteLine($"ENTER THE DESCRIPTION FOR {content.MealName}. \n"); //ASK FOR (Description) content.Description = Console.ReadLine(); Console.WriteLine($"ENTER THE PRICE {content.MealName} WITHOUT A $ SIGN. \n"); //ASK FOR (Price) content.Price = double.Parse(Console.ReadLine()); Console.WriteLine($"ENTER THE LIST OF INGREDIENTS {content.MealName} AND PRESS ENTER. \n"); //ASK FOR (Price) content.ListOfIngredients = Console.ReadLine(); _menuRepository.AddContentToDirectory(content); }
public void Arrange() { _repo = new MenuRepository(); _menu = new Menu(1, "CheeseBurger", "Meat patty in a bun with cheese.", ingredientListTest, true, true, 6.50m); _repo.AddContentToDirectory(_menu); }