Esempio n. 1
0
        public void MapBOToModelList()
        {
            var         mapper = new BOLPostLinksMapper();
            BOPostLinks bo     = new BOPostLinks();

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

            response.Count.Should().Be(1);
        }
Esempio n. 2
0
        public void MapBOToModel()
        {
            var         mapper = new BOLPostLinksMapper();
            BOPostLinks bo     = new BOPostLinks();

            bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1);
            ApiPostLinksResponseModel 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);
        }