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

            entity.SetProperties(BitConverter.GetBytes(1), "A", "A", "A");

            BOLifecycle response = mapper.MapEFToBO(entity);

            response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1));
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }
コード例 #2
0
        public void MapEFToBOList()
        {
            var       mapper = new DALLifecycleMapper();
            Lifecycle entity = new Lifecycle();

            entity.SetProperties(BitConverter.GetBytes(1), "A", "A", "A");

            List <BOLifecycle> response = mapper.MapEFToBO(new List <Lifecycle>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
コード例 #3
0
        public void MapBOToEF()
        {
            var mapper = new DALLifecycleMapper();
            var bo     = new BOLifecycle();

            bo.SetProperties("A", BitConverter.GetBytes(1), "A", "A");

            Lifecycle response = mapper.MapBOToEF(bo);

            response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1));
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }