Example #1
0
        public void MapBOToModelList()
        {
            var        mapper = new BOLPostLinkMapper();
            BOPostLink bo     = new BOPostLink();

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

            response.Count.Should().Be(1);
        }
Example #2
0
        public void MapModelToBO()
        {
            var mapper = new BOLPostLinkMapper();
            ApiPostLinkRequestModel model = new ApiPostLinkRequestModel();

            model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1);
            BOPostLink response = mapper.MapModelToBO(1, model);

            response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.LinkTypeId.Should().Be(1);
            response.PostId.Should().Be(1);
            response.RelatedPostId.Should().Be(1);
        }
Example #3
0
        public void MapBOToModel()
        {
            var        mapper = new BOLPostLinkMapper();
            BOPostLink bo     = new BOPostLink();

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

            response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Id.Should().Be(1);
            response.LinkTypeId.Should().Be(1);
            response.PostId.Should().Be(1);
            response.RelatedPostId.Should().Be(1);
        }