make sure test work + add a test for RecipeCollection.ResearchByName
continuous-integration/drone/push Build is passing Details

pull/35/head
Alexandre AGOSTINHO 2 years ago
parent 2143f0637e
commit b2e6217d10

@ -0,0 +1,28 @@
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", id: 1),
new Recipe(title: "Gateau au chocolat", id: 2),
new Recipe(title: "Gateau aux cerises", id: 3)
});
Assert.Equal(2, recipes.ResearchByName("chocolat").FirstOrDefault().Id);
}
}
}
Loading…
Cancel
Save