public void GetDirectory_ShouldReturnCurrentCollection() { MainFood content = new MainFood(); Main_Repository repo = new Main_Repository(); repo.AddContentToMainFood(content); List <MainFood> contents = repo.GetAllContent(); bool directoryHasContent = contents.Contains(content); Assert.IsTrue(directoryHasContent); }
//read private void GetAllContent() { Console.Clear(); List <MainFood> directory = _repo.GetAllContent(); foreach (MainFood content in directory) { Console.WriteLine($"Item Name: {content.MainFoodName}\n" + $"Description: {content.MainDescription}\n" + $"Ingredients{content.MainIngredients}\n" + $"Menu Number: {content.MenuNumber}\n" + $"Price: ${content.MainPrice}"); } Console.WriteLine("Press any button to Continue."); Console.ReadKey(); }