コード例 #1
0
        private async Task <ApiPipelineStepDestinationResponseModel> CreateRecord()
        {
            var model = new ApiPipelineStepDestinationRequestModel();

            model.SetProperties(1, 1);
            CreateResponse <ApiPipelineStepDestinationResponseModel> result = await this.Client.PipelineStepDestinationCreateAsync(model);

            result.Success.Should().BeTrue();
            return(result.Record);
        }
コード例 #2
0
        public void MapModelToBO()
        {
            var mapper = new BOLPipelineStepDestinationMapper();
            ApiPipelineStepDestinationRequestModel model = new ApiPipelineStepDestinationRequestModel();

            model.SetProperties(1, 1);
            BOPipelineStepDestination response = mapper.MapModelToBO(1, model);

            response.DestinationId.Should().Be(1);
            response.PipelineStepId.Should().Be(1);
        }
コード例 #3
0
        public void MapRequestToResponse()
        {
            var mapper = new ApiPipelineStepDestinationModelMapper();
            var model  = new ApiPipelineStepDestinationRequestModel();

            model.SetProperties(1, 1);
            ApiPipelineStepDestinationResponseModel response = mapper.MapRequestToResponse(1, model);

            response.DestinationId.Should().Be(1);
            response.Id.Should().Be(1);
            response.PipelineStepId.Should().Be(1);
        }
コード例 #4
0
        public void CreatePatch()
        {
            var mapper = new ApiPipelineStepDestinationModelMapper();
            var model  = new ApiPipelineStepDestinationRequestModel();

            model.SetProperties(1, 1);

            JsonPatchDocument <ApiPipelineStepDestinationRequestModel> patch = mapper.CreatePatch(model);
            var response = new ApiPipelineStepDestinationRequestModel();

            patch.ApplyTo(response);
            response.DestinationId.Should().Be(1);
            response.PipelineStepId.Should().Be(1);
        }