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.
46 lines
1.5 KiB
46 lines
1.5 KiB
using Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ConsoleApp
|
|
{
|
|
internal struct Stub
|
|
{
|
|
public List<Recipe> LoadRecipes()
|
|
{
|
|
List<Recipe> stub = new List<Recipe>();
|
|
stub.AddRange(new[]
|
|
{
|
|
new Recipe(),
|
|
new Recipe("Cookies"),
|
|
new Recipe("Cookies", 23),
|
|
new Recipe("Cookies", null),
|
|
new Recipe("", null),
|
|
new Recipe("", 24),
|
|
new Recipe("Cookies", 24,
|
|
new PreparationStep(1)),
|
|
new Recipe("Cookies", 26,
|
|
new PreparationStep(1),
|
|
new PreparationStep(2, "Faire cuire."))
|
|
});
|
|
return stub;
|
|
}
|
|
|
|
public List<RecipeCollection> LoadRecipeCollection()
|
|
{
|
|
List<RecipeCollection> stub = new List<RecipeCollection>();
|
|
stub.AddRange(new[]
|
|
{
|
|
new RecipeCollection("All", LoadRecipes().ToArray()),
|
|
new RecipeCollection("Starters", LoadRecipes().FindAll(x => x.Id.Equals(23)).ToArray()),
|
|
new RecipeCollection("Dishies", LoadRecipes().FindAll(x => x.Id.Equals(24)).ToArray()),
|
|
new RecipeCollection("Desserts", LoadRecipes().FindAll(x => x.Id.Equals(26)).ToArray()),
|
|
});
|
|
return stub;
|
|
}
|
|
}
|
|
}
|