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.
31 lines
848 B
31 lines
848 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
using Model;
|
|
|
|
namespace Model_UnitTests
|
|
{
|
|
public class RecipeCollection_UT
|
|
{
|
|
[Fact]
|
|
public void TestResearchByName()
|
|
{
|
|
RecipeCollection recipes = new RecipeCollection(
|
|
description: "test recipe",
|
|
recipes: new[]
|
|
{
|
|
new Recipe(title: "Gateau à la crème"),
|
|
new Recipe(title: "Gateau au chocolat"),
|
|
new Recipe(title: "Gateau aux cerises")
|
|
});
|
|
|
|
Recipe? search_result = recipes.ResearchByName("chocolat").FirstOrDefault();
|
|
Assert.NotNull(search_result);
|
|
Assert.Equal("Gateau au chocolat", search_result.Title);
|
|
}
|
|
}
|
|
}
|