コード例 #1
0
        public void MapEFToBO()
        {
            var      mapper = new DALPostTypeMapper();
            PostType entity = new PostType();

            entity.SetProperties(1, "A");

            BOPostType response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
コード例 #2
0
        public void MapBOToEF()
        {
            var mapper = new DALPostTypeMapper();
            var bo     = new BOPostType();

            bo.SetProperties(1, "A");

            PostType response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
コード例 #3
0
        public void MapEFToBOList()
        {
            var      mapper = new DALPostTypeMapper();
            PostType entity = new PostType();

            entity.SetProperties(1, "A");

            List <BOPostType> response = mapper.MapEFToBO(new List <PostType>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }