public Task <UpdateWorkflowResponse> UpdateWorkflow(string workflowId, UpdateWorkflowRequest updateWorkflowRequest) { CheckoutUtils.ValidateParams(WorkflowId, workflowId, "updateWorkflowRequest", updateWorkflowRequest); return(ApiClient.Patch <UpdateWorkflowResponse>(BuildPath(WorkflowsPath, workflowId), SdkAuthorization(), updateWorkflowRequest)); }
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(); }
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); }