Exemplo n.º 1
0
        public virtual ApiReplyResponseModel MapBOToModel(
            BOReply boReply)
        {
            var model = new ApiReplyResponseModel();

            model.SetProperties(boReply.ReplyId, boReply.Content, boReply.Date, boReply.ReplierUserId, boReply.Time);

            return(model);
        }
Exemplo n.º 2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiReplyModelMapper();
            var model  = new ApiReplyResponseModel();

            model.SetProperties(1, "A", DateTime.Parse("1/1/1987 12:00:00 AM"), 1, TimeSpan.Parse("0"));
            ApiReplyRequestModel response = mapper.MapResponseToRequest(model);

            response.Content.Should().Be("A");
            response.Date.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ReplierUserId.Should().Be(1);
            response.Time.Should().Be(TimeSpan.Parse("0"));
        }