コード例 #1
0
        public virtual ApiWorkerPoolResponseModel MapBOToModel(
            BOWorkerPool boWorkerPool)
        {
            var model = new ApiWorkerPoolResponseModel();

            model.SetProperties(boWorkerPool.Id, boWorkerPool.IsDefault, boWorkerPool.JSON, boWorkerPool.Name, boWorkerPool.SortOrder);

            return(model);
        }
コード例 #2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiWorkerPoolModelMapper();
            var model  = new ApiWorkerPoolResponseModel();

            model.SetProperties("A", true, "A", "A", 1);
            ApiWorkerPoolRequestModel response = mapper.MapResponseToRequest(model);

            response.IsDefault.Should().Be(true);
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.SortOrder.Should().Be(1);
        }