예제 #1
0
        public virtual ApiMessageServerRequestModel MapServerResponseToRequest(
            ApiMessageServerResponseModel response)
        {
            var request = new ApiMessageServerRequestModel();

            request.SetProperties(
                response.Content,
                response.SenderUserId);
            return(request);
        }
예제 #2
0
        public void MapModelToEntity()
        {
            var mapper = new DALMessageMapper();
            ApiMessageServerRequestModel model = new ApiMessageServerRequestModel();

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

            response.Content.Should().Be("A");
            response.SenderUserId.Should().Be(1);
        }