public async Task ShouldSendDeployResourceStringUtf8AsExpected() { // given var expectedRequest = new DeployWorkflowRequest { Workflows = { new WorkflowRequestObject { Definition = ByteString.FromStream(File.OpenRead(_demoProcessPath)), Name = _demoProcessPath, Type = WorkflowRequestObject.Types.ResourceType.File } } }; // when var fileContent = File.ReadAllText(_demoProcessPath); await ZeebeClient.NewDeployCommand() .AddResourceStringUtf8(fileContent, _demoProcessPath) .Send(); // then var actualRequest = TestService.Requests[0]; Assert.AreEqual(expectedRequest, actualRequest); }
public async Task ShouldSendMultipleDeployResourceAsExpected() { // given var expectedRequest = new DeployWorkflowRequest { Workflows = { new WorkflowRequestObject { Definition = ByteString.FromStream(File.OpenRead(DemoProcessPath)), Name = DemoProcessPath, Type = WorkflowRequestObject.Types.ResourceType.File }, new WorkflowRequestObject { Definition = ByteString.FromStream(File.OpenRead(DemoProcessPath)), Name = DemoProcessPath, Type = WorkflowRequestObject.Types.ResourceType.File } } }; // when await ZeebeClient.NewDeployCommand() .AddResourceFile(DemoProcessPath) .AddResourceStream(File.OpenRead(DemoProcessPath), DemoProcessPath) .Send(); // then var actualRequest = TestService.Requests[0]; Assert.AreEqual(expectedRequest, actualRequest); }
public override Task <DeployWorkflowResponse> DeployWorkflow(DeployWorkflowRequest request, ServerCallContext context) { return(Task.FromResult((DeployWorkflowResponse)HandleRequest(request, context))); }
public DeployWorkflowCommand(Gateway.GatewayClient client) { gatewayClient = client; request = new DeployWorkflowRequest(); }
public override AsyncUnaryCall <DeployWorkflowResponse> DeployWorkflowAsync(DeployWorkflowRequest request, Metadata headers = null, DateTime?deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { throw new ObjectDisposedException(ZeebeClientWasAlreadyDisposed); }
public override DeployWorkflowResponse DeployWorkflow(DeployWorkflowRequest request, CallOptions options) { throw new ObjectDisposedException(ZeebeClientWasAlreadyDisposed); }