Example #1
0
        public void With_args_it_should_create()
        {
            Guid expectedId = Guid.NewGuid();

            var sut = new PersonSearchResponse(expectedId);

            Assert.AreEqual(expectedId, sut.Id);
        }
Example #2
0
        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);
        }