Beispiel #1
0
        public void MapModelToEntity()
        {
            var mapper = new DALPipelineStatusMapper();
            ApiPipelineStatusServerRequestModel model = new ApiPipelineStatusServerRequestModel();

            model.SetProperties("A");
            PipelineStatus response = mapper.MapModelToEntity(1, model);

            response.Name.Should().Be("A");
        }
Beispiel #2
0
        public void MapEntityToModel()
        {
            var            mapper = new DALPipelineStatusMapper();
            PipelineStatus item   = new PipelineStatus();

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

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Beispiel #3
0
        public void MapEntityToModelList()
        {
            var            mapper = new DALPipelineStatusMapper();
            PipelineStatus item   = new PipelineStatus();

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

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