public TypeOfIngredientServiceTests() { this.service = new TypeOfIngredientService(); service.Add(new TypeOfIngredient { Name = "groats" } ); service.Add(new TypeOfIngredient { Name = "spice" } ); }
public void AddTest() { var name = Guid.NewGuid().ToString(); var newTypeOfIngredient = new TypeOfIngredient { Name = name }; var AddedTypeOfIngredient = service.Add(newTypeOfIngredient); Assert.IsNotNull(AddedTypeOfIngredient); Assert.IsTrue(AddedTypeOfIngredient.Id > 0); Assert.AreEqual(AddedTypeOfIngredient.Name, name); }