Example #1
0
        public virtual Lifecycle MapBOToEF(
            BOLifecycle bo)
        {
            Lifecycle efLifecycle = new Lifecycle();

            efLifecycle.SetProperties(
                bo.DataVersion,
                bo.Id,
                bo.JSON,
                bo.Name);
            return(efLifecycle);
        }
Example #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);
        }
Example #3
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");
        }