示例#1
0
        public void MapModelToBO()
        {
            var mapper = new BOLExtensionConfigurationMapper();
            ApiExtensionConfigurationRequestModel model = new ApiExtensionConfigurationRequestModel();

            model.SetProperties("A", "A", "A");
            BOExtensionConfiguration response = mapper.MapModelToBO("A", model);

            response.ExtensionAuthor.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }
示例#2
0
        public void MapBOToModelList()
        {
            var mapper = new BOLExtensionConfigurationMapper();
            BOExtensionConfiguration bo = new BOExtensionConfiguration();

            bo.SetProperties("A", "A", "A", "A");
            List <ApiExtensionConfigurationResponseModel> response = mapper.MapBOToModel(new List <BOExtensionConfiguration>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
示例#3
0
        public void MapBOToModel()
        {
            var mapper = new BOLExtensionConfigurationMapper();
            BOExtensionConfiguration bo = new BOExtensionConfiguration();

            bo.SetProperties("A", "A", "A", "A");
            ApiExtensionConfigurationResponseModel response = mapper.MapBOToModel(bo);

            response.ExtensionAuthor.Should().Be("A");
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }
示例#4
0
        public void MapEFToBO()
        {
            var mapper = new DALExtensionConfigurationMapper();
            ExtensionConfiguration entity = new ExtensionConfiguration();

            entity.SetProperties("A", "A", "A", "A");

            BOExtensionConfiguration response = mapper.MapEFToBO(entity);

            response.ExtensionAuthor.Should().Be("A");
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }
示例#5
0
        public void MapBOToEF()
        {
            var mapper = new DALExtensionConfigurationMapper();
            var bo     = new BOExtensionConfiguration();

            bo.SetProperties("A", "A", "A", "A");

            ExtensionConfiguration response = mapper.MapBOToEF(bo);

            response.ExtensionAuthor.Should().Be("A");
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }