public void Test_SaveToDatabase() { // Arrange firstIngredient.Save(); // Act List <Ingredient> result = Ingredient.GetAllIngredients(); List <Ingredient> testList = new List <Ingredient> { firstIngredient }; // Assert Assert.Equal(testList, result); }
public void Test_GetIngredients_ReturnsAllIngredientsInARecipe() { //Arrange firstRecipe.Save(); firstIngredient.Save(); firstRecipe.AddIngredient(firstIngredient); List <Ingredient> savedIngredients = firstRecipe.GetIngredients(); List <Ingredient> firstList = new List <Ingredient> { firstIngredient }; //Assert Assert.Equal(firstList, savedIngredients); }