Пример #1
0
        public virtual ApiCallPersonServerRequestModel MapServerResponseToRequest(
            ApiCallPersonServerResponseModel response)
        {
            var request = new ApiCallPersonServerRequestModel();

            request.SetProperties(
                response.Note,
                response.PersonId,
                response.PersonTypeId);
            return(request);
        }
Пример #2
0
        public void MapModelToEntity()
        {
            var mapper = new DALCallPersonMapper();
            ApiCallPersonServerRequestModel model = new ApiCallPersonServerRequestModel();

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

            response.Note.Should().Be("A");
            response.PersonId.Should().Be(1);
            response.PersonTypeId.Should().Be(1);
        }