예제 #1
0
        public void MapBOToModelList()
        {
            var       mapper = new BOLCommentMapper();
            BOComment bo     = new BOComment();

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

            response.Count.Should().Be(1);
        }
예제 #2
0
        public void MapBOToModel()
        {
            var       mapper = new BOLCommentMapper();
            BOComment bo     = new BOComment();

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

            response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Id.Should().Be(1);
            response.PostId.Should().Be(1);
            response.Score.Should().Be(1);
            response.Text.Should().Be("A");
            response.UserId.Should().Be(1);
        }