コード例 #1
0
        public virtual PipelineStepStatus MapBOToEF(
            BOPipelineStepStatus bo)
        {
            PipelineStepStatus efPipelineStepStatus = new PipelineStepStatus();

            efPipelineStepStatus.SetProperties(
                bo.Id,
                bo.Name);
            return(efPipelineStepStatus);
        }
コード例 #2
0
        public void MapEntityToModel()
        {
            var mapper = new DALPipelineStepStatusMapper();
            PipelineStepStatus item = new PipelineStepStatus();

            item.SetProperties(1, "A");
            ApiPipelineStepStatusServerResponseModel response = mapper.MapEntityToModel(item);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
コード例 #3
0
        public void MapEFToBO()
        {
            var mapper = new DALPipelineStepStatusMapper();
            PipelineStepStatus entity = new PipelineStepStatus();

            entity.SetProperties(1, "A");

            BOPipelineStepStatus response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
コード例 #4
0
        public virtual PipelineStepStatus MapModelToEntity(
            int id,
            ApiPipelineStepStatusServerRequestModel model
            )
        {
            PipelineStepStatus item = new PipelineStepStatus();

            item.SetProperties(
                id,
                model.Name);
            return(item);
        }
コード例 #5
0
        public void MapEntityToModelList()
        {
            var mapper = new DALPipelineStepStatusMapper();
            PipelineStepStatus item = new PipelineStepStatus();

            item.SetProperties(1, "A");
            List <ApiPipelineStepStatusServerResponseModel> response = mapper.MapEntityToModel(new List <PipelineStepStatus>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
コード例 #6
0
        public void MapEFToBOList()
        {
            var mapper = new DALPipelineStepStatusMapper();
            PipelineStepStatus entity = new PipelineStepStatus();

            entity.SetProperties(1, "A");

            List <BOPipelineStepStatus> response = mapper.MapEFToBO(new List <PipelineStepStatus>()
            {
                entity
            });

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