Beispiel #1
0
        public void MapBOToModelList()
        {
            var     mapper = new BOLReplyMapper();
            BOReply bo     = new BOReply();

            bo.SetProperties(1, "A", DateTime.Parse("1/1/1987 12:00:00 AM"), 1, TimeSpan.Parse("0"));
            List <ApiReplyResponseModel> response = mapper.MapBOToModel(new List <BOReply>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Beispiel #2
0
        public void MapBOToModel()
        {
            var     mapper = new BOLReplyMapper();
            BOReply bo     = new BOReply();

            bo.SetProperties(1, "A", DateTime.Parse("1/1/1987 12:00:00 AM"), 1, TimeSpan.Parse("0"));
            ApiReplyResponseModel response = mapper.MapBOToModel(bo);

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