예제 #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);
        }
예제 #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);
        }