public async Task FormBuildRepository_UpdateForm_Success() { //arrange FormBuild formBuild = new FormBuild("Test", DateTime.Now.AddDays(10)); await _repository.AddAsync(formBuild); await _unitOfWork.SaveChangesAsync(); formBuild.SetName("Test 2"); //act _repository.Update(formBuild); await _unitOfWork.SaveChangesAsync(); FormBuild formUpdated = await _dbContext.FormBuilds.FindAsync(formBuild.Id); //assert Assert.Equal(formUpdated.Id, formBuild.Id); Assert.Equal(formUpdated.Name, formBuild.Name); }
public void Update(FormBuild formBuild) { _repository.Update(formBuild); }