use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CreateProcessInstanceWithResultResponse in project zeebe by camunda-cloud.
the class CreateProcessInstanceWithResultTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final CreateProcessInstanceWithResultStub stub = new CreateProcessInstanceWithResultStub();
stub.registerWith(brokerClient);
final CreateProcessInstanceWithResultRequest request = CreateProcessInstanceWithResultRequest.newBuilder().setRequest(CreateProcessInstanceRequest.newBuilder().setProcessDefinitionKey(stub.getProcessDefinitionKey())).build();
// when
final CreateProcessInstanceWithResultResponse response = client.createProcessInstanceWithResult(request);
// then
assertThat(response.getBpmnProcessId()).isEqualTo(stub.getProcessId());
assertThat(response.getVersion()).isEqualTo(stub.getProcessVersion());
assertThat(response.getProcessDefinitionKey()).isEqualTo(stub.getProcessDefinitionKey());
assertThat(response.getProcessInstanceKey()).isEqualTo(stub.getProcessInstanceKey());
}
use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CreateProcessInstanceWithResultResponse in project zeebe by zeebe-io.
the class CreateProcessInstanceWithResultTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final CreateProcessInstanceWithResultStub stub = new CreateProcessInstanceWithResultStub();
stub.registerWith(brokerClient);
final CreateProcessInstanceWithResultRequest request = CreateProcessInstanceWithResultRequest.newBuilder().setRequest(CreateProcessInstanceRequest.newBuilder().setProcessDefinitionKey(stub.getProcessDefinitionKey())).build();
// when
final CreateProcessInstanceWithResultResponse response = client.createProcessInstanceWithResult(request);
// then
assertThat(response.getBpmnProcessId()).isEqualTo(stub.getProcessId());
assertThat(response.getVersion()).isEqualTo(stub.getProcessVersion());
assertThat(response.getProcessDefinitionKey()).isEqualTo(stub.getProcessDefinitionKey());
assertThat(response.getProcessInstanceKey()).isEqualTo(stub.getProcessInstanceKey());
}
use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CreateProcessInstanceWithResultResponse in project zeebe by camunda.
the class CreateProcessInstanceWithResultTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final CreateProcessInstanceWithResultStub stub = new CreateProcessInstanceWithResultStub();
stub.registerWith(brokerClient);
final CreateProcessInstanceWithResultRequest request = CreateProcessInstanceWithResultRequest.newBuilder().setRequest(CreateProcessInstanceRequest.newBuilder().setProcessDefinitionKey(stub.getProcessDefinitionKey())).build();
// when
final CreateProcessInstanceWithResultResponse response = client.createProcessInstanceWithResult(request);
// then
assertThat(response.getBpmnProcessId()).isEqualTo(stub.getProcessId());
assertThat(response.getVersion()).isEqualTo(stub.getProcessVersion());
assertThat(response.getProcessDefinitionKey()).isEqualTo(stub.getProcessDefinitionKey());
assertThat(response.getProcessInstanceKey()).isEqualTo(stub.getProcessInstanceKey());
}
Aggregations