Esempio n. 1
0
        public virtual ApiHandlerServerRequestModel MapServerResponseToRequest(
            ApiHandlerServerResponseModel response)
        {
            var request = new ApiHandlerServerRequestModel();

            request.SetProperties(
                response.CountryId,
                response.Email,
                response.FirstName,
                response.LastName,
                response.Phone);
            return(request);
        }
Esempio n. 2
0
        public void MapModelToEntity()
        {
            var mapper = new DALHandlerMapper();
            ApiHandlerServerRequestModel model = new ApiHandlerServerRequestModel();

            model.SetProperties(1, "A", "A", "A", "A");
            Handler response = mapper.MapModelToEntity(1, model);

            response.CountryId.Should().Be(1);
            response.Email.Should().Be("A");
            response.FirstName.Should().Be("A");
            response.LastName.Should().Be("A");
            response.Phone.Should().Be("A");
        }