public void Delete_FromSeeded_DoesNotThrow() { //Arrange var detailModel = RecipeMapper.MapToDetailModel(CookBookSeedingDbContext.RecipeEntity); //Act & Assert RepositorySUT.Delete(detailModel); }
public void Delete_FromSeeded_DoesNotThrow() { //Arrange var detailModel = RecipeMapper.MapToDetailModel(DAL.Seeds.Seeds.RecipeEntity); //Act & Assert RepositorySUT.Delete(detailModel); }
public void Update_FromSeeded_DoesNotThrow() { //Arrange var detailModel = RecipeMapper.MapToDetailModel(CookBookSeedingDbContext.RecipeEntity); detailModel.Name = "Changed recipe name"; //Act & Assert RepositorySUT.InsertOrUpdate(detailModel); }
public void GetById_FromSeeded_DoesNotThrowAndEqualsSeeded() { //Arrange var detailModel = RecipeMapper.MapToDetailModel(CookBookSeedingDbContext.RecipeEntity); //Act var returnedModel = RepositorySUT.GetById(detailModel.Id); //Assert Assert.Equal(detailModel, returnedModel, RecipeDetailModel.RecipeDetailModelComparer); }
public void Update_RemoveIngredients_FromSeeded_CheckUpdated() { //Arrange var detailModel = RecipeMapper.MapToDetailModel(CookBookSeedingDbContext.RecipeEntity); detailModel.Ingredients.Clear(); //Act RepositorySUT.InsertOrUpdate(detailModel); //Assert var returnedModel = RepositorySUT.GetById(detailModel.Id); Assert.Equal(detailModel, returnedModel, RecipeDetailModel.RecipeDetailModelComparer); }
public void Update_Name_FromSeeded_CheckUpdated() { //Arrange var detailModel = RecipeMapper.MapToDetailModel(CookBookSeedingDbContext.RecipeEntity); detailModel.Name = "Changed recipe name 1"; //Act RepositorySUT.InsertOrUpdate(detailModel); //Assert var returnedModel = RepositorySUT.GetById(detailModel.Id); Assert.Equal(detailModel, returnedModel, RecipeDetailModel.RecipeDetailModelComparer); }