Example #1
0
        public void MapEFToBOList()
        {
            var      mapper = new DALPostLinkMapper();
            PostLink entity = new PostLink();

            entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1, 1);

            List <BOPostLink> response = mapper.MapEFToBO(new List <PostLink>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
Example #2
0
        public void MapEFToBO()
        {
            var      mapper = new DALPostLinkMapper();
            PostLink entity = new PostLink();

            entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1, 1);

            BOPostLink response = mapper.MapEFToBO(entity);

            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);
        }
Example #3
0
        public void MapBOToEF()
        {
            var mapper = new DALPostLinkMapper();
            var bo     = new BOPostLink();

            bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1);

            PostLink response = mapper.MapBOToEF(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);
        }