using Model; namespace Model_UnitTests { public class Recipe_UT { [Fact] public void TestVoidConstructor() { Recipe r = new Recipe(id: 999); // id is given to avoid tests errors with the static atrribute 'idCreator'. Assert.NotNull(r.Title); } [Theory] [InlineData("Cookies", 23, "Cookies", 23)] [InlineData("Cookies", 1, "Cookies", 1)] [InlineData("No title.", 1, "", 1)] public void TestConstructor(string expectedTitle, int expectedId, string title, int? id) { Recipe r = new Recipe(title, id); Assert.NotNull(r.Title); Assert.Equal(expectedId, r.Id); Assert.Equal(expectedTitle, r.Title); } } }