public void With_args_it_should_create() { Guid expectedId = Guid.NewGuid(); var sut = new PersonSearchResponse(expectedId); Assert.AreEqual(expectedId, sut.Id); }
public PersonSearchResponse Search(PersonSearchRequest request) { var response = new PersonSearchResponse(); if (request == null) { throw new ArgumentNullException("request"); } try { response.Results = _personSearchBusiness.Search(request); response.Success = true; } catch (Exception e) { response.Success = false; response.Messages.Add(e.Message); } return(response); }