use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceResponse in project zeebe by camunda.
the class CancelProcessInstanceTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final CancelProcessInstanceStub stub = new CancelProcessInstanceStub();
stub.registerWith(brokerClient);
final CancelProcessInstanceRequest request = CancelProcessInstanceRequest.newBuilder().setProcessInstanceKey(123).build();
// when
final CancelProcessInstanceResponse response = client.cancelProcessInstance(request);
// then
assertThat(response).isNotNull();
final BrokerCancelProcessInstanceRequest brokerRequest = brokerClient.getSingleBrokerRequest();
assertThat(brokerRequest.getKey()).isEqualTo(123);
assertThat(brokerRequest.getIntent()).isEqualTo(ProcessInstanceIntent.CANCEL);
assertThat(brokerRequest.getValueType()).isEqualTo(ValueType.PROCESS_INSTANCE);
}
use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceResponse in project zeebe by camunda-cloud.
the class CancelProcessInstanceTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final CancelProcessInstanceStub stub = new CancelProcessInstanceStub();
stub.registerWith(brokerClient);
final CancelProcessInstanceRequest request = CancelProcessInstanceRequest.newBuilder().setProcessInstanceKey(123).build();
// when
final CancelProcessInstanceResponse response = client.cancelProcessInstance(request);
// then
assertThat(response).isNotNull();
final BrokerCancelProcessInstanceRequest brokerRequest = brokerClient.getSingleBrokerRequest();
assertThat(brokerRequest.getKey()).isEqualTo(123);
assertThat(brokerRequest.getIntent()).isEqualTo(ProcessInstanceIntent.CANCEL);
assertThat(brokerRequest.getValueType()).isEqualTo(ValueType.PROCESS_INSTANCE);
}
use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceResponse in project zeebe by zeebe-io.
the class CancelProcessInstanceTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final CancelProcessInstanceStub stub = new CancelProcessInstanceStub();
stub.registerWith(brokerClient);
final CancelProcessInstanceRequest request = CancelProcessInstanceRequest.newBuilder().setProcessInstanceKey(123).build();
// when
final CancelProcessInstanceResponse response = client.cancelProcessInstance(request);
// then
assertThat(response).isNotNull();
final BrokerCancelProcessInstanceRequest brokerRequest = brokerClient.getSingleBrokerRequest();
assertThat(brokerRequest.getKey()).isEqualTo(123);
assertThat(brokerRequest.getIntent()).isEqualTo(ProcessInstanceIntent.CANCEL);
assertThat(brokerRequest.getValueType()).isEqualTo(ValueType.PROCESS_INSTANCE);
}
Aggregations