public async Task VerifyEditFunction() { var project = TestData.GetProjects().FirstOrDefault(); await _manageProject.EditProject(project); _projectRepository.Verify(r => r.EditProject(project), Times.Once); }
public async Task <IActionResult> Put(int id, [FromBody] Project project) { if (!ModelState.IsValid || project == null || id != project.ProjectId) { return(BadRequest("Provided project details are not valid.")); } await _manageProject.EditProject(project); return(Ok(project.ProjectId)); }