public Task <UpdateWorkflowResponse> UpdateWorkflow(string workflowId,
                                                     UpdateWorkflowRequest updateWorkflowRequest)
 {
     CheckoutUtils.ValidateParams(WorkflowId, workflowId, "updateWorkflowRequest", updateWorkflowRequest);
     return(ApiClient.Patch <UpdateWorkflowResponse>(BuildPath(WorkflowsPath, workflowId), SdkAuthorization(),
                                                     updateWorkflowRequest));
 }
示例#2
0
        public async Task ShouldUpdateWorkflow()
        {
            UpdateWorkflowRequest  updateWorkflowRequest  = new UpdateWorkflowRequest();
            UpdateWorkflowResponse updateWorkflowResponse = new UpdateWorkflowResponse();

            _apiClient.Setup(apiClient =>
                             apiClient.Patch <UpdateWorkflowResponse>("workflows" + "/workflow_id", _authorization,
                                                                      updateWorkflowRequest, CancellationToken.None, null))
            .ReturnsAsync(() => updateWorkflowResponse);

            IWorkflowsClient workflowsClient = new WorkflowsClient(_apiClient.Object, _configuration.Object);

            var response = await workflowsClient.UpdateWorkflow("workflow_id", updateWorkflowRequest);

            response.ShouldNotBeNull();
        }
示例#3
0
        public async Task ShouldCreateAndUpdateWorkflow()
        {
            var workflow = await CreateWorkflow();

            UpdateWorkflowRequest request = new UpdateWorkflowRequest {
                Name = "testing_2", Active = false
            };

            UpdateWorkflowResponse updateWorkflowResponse =
                await DefaultApi.WorkflowsClient().UpdateWorkflow(workflow.Id, request);

            updateWorkflowResponse.ShouldNotBeNull();
            updateWorkflowResponse.HttpStatusCode.ShouldNotBeNull();
            updateWorkflowResponse.ResponseHeaders.ShouldNotBeNull();
            updateWorkflowResponse.Body.ShouldNotBeNull();
            updateWorkflowResponse.Name.ShouldBe("testing_2");
            updateWorkflowResponse.Active.ShouldBe(false);
        }