You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
793 B
29 lines
793 B
// See https://aka.ms/new-console-template for more information
|
|
|
|
using ConsoleApp;
|
|
using ConsoleApp.Menu;
|
|
using Model;
|
|
|
|
using System.Text;
|
|
|
|
Console.WriteLine("Hello, World!\n\n");
|
|
|
|
|
|
// TESTS:
|
|
|
|
Stub stub = new Stub();
|
|
|
|
List<Recipe> recipes = stub.LoadRecipes();
|
|
List<RecipeCollection> recipeCollections = stub.LoadRecipeCollection();
|
|
|
|
RecipeCollection? allRecipe = recipeCollections.Find(x => x.Description.Equals("All"));
|
|
if (allRecipe == null)
|
|
throw new ArgumentException("Load AllRecipe in stub: can't find 'All'.");
|
|
|
|
DataManager manager = new DataManager(allRecipe);
|
|
|
|
MenuManager menuManager = new MenuManager(manager, ConsoleApp.Menu.SearcherRecipe.SearchInRecipeCollection("search recipe", manager.AllRecipes));
|
|
|
|
// press any key to quit
|
|
Console.ReadKey();
|