public Task <EmployeeResponse> ListByIdetificationNumberAsync(string identificationNUmber) { var employee = _unitOfWork.EmployeeRepository .GetAsync(p => p.IdentificationNumber == identificationNUmber).Result; return(Task.FromResult(EmployeeServiceMapper.ConvertObjectToResponse(employee))); }
public void ConvertToResponseAsync_ReturnList_Success() { _testOutput.WriteLine("Objeto não pode ser nulo."); var expected = Builder <Employee> .CreateNew().Build(); var result = EmployeeServiceMapper.ConvertObjectToResponse(expected); Assert.NotNull(expected); Assert.NotNull(result); Assert.IsType <Employee>(expected); Assert.IsType <EmployeeResponse>(result); Assert.Equal(expected.Name, result.Name); }