public void Collaborator_SearchCollaborator_FoundSuccessfully(long id) { _collaboratorRepository.GetById(id).Returns <Collaborator>(new Collaborator { }); var result = _collaboratorRepository.GetById(id); Assert.NotNull(result, message: "The result is null"); }
public async Task <IActionResult> Details(Guid id) { var collaboratorViewModel = _mapper.Map <CollaboratorViewModel>(await _collaboratorRepository.GetById(id)); if (collaboratorViewModel == null) { return(NotFound()); } return(View(collaboratorViewModel)); }
public void UpdateCollaborator(Collaborator collaborator) { var existingCollaborator = collaboratorRepository.GetById(collaborator.CollaboratorId); if (existingCollaborator != null) { existingCollaborator.Status = collaborator.Status; SaveCollaborator(); } }
public Collaborator GetById(long id) { return(_collaboratorRepository.GetById(id)); }