use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentResponse in project zeebe by camunda.
the class ResolveIncidentTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final ResolveIncidentStub stub = new ResolveIncidentStub();
stub.registerWith(brokerClient);
final ResolveIncidentRequest request = ResolveIncidentRequest.newBuilder().setIncidentKey(stub.getIncidentKey()).build();
// when
final ResolveIncidentResponse response = client.resolveIncident(request);
// then
assertThat(response).isNotNull();
final BrokerResolveIncidentRequest brokerRequest = brokerClient.getSingleBrokerRequest();
assertThat(brokerRequest.getIntent()).isEqualTo(IncidentIntent.RESOLVE);
assertThat(brokerRequest.getValueType()).isEqualTo(ValueType.INCIDENT);
assertThat(brokerRequest.getKey()).isEqualTo(stub.getIncidentKey());
}
use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentResponse in project zeebe by zeebe-io.
the class ResolveIncidentTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final ResolveIncidentStub stub = new ResolveIncidentStub();
stub.registerWith(brokerClient);
final ResolveIncidentRequest request = ResolveIncidentRequest.newBuilder().setIncidentKey(stub.getIncidentKey()).build();
// when
final ResolveIncidentResponse response = client.resolveIncident(request);
// then
assertThat(response).isNotNull();
final BrokerResolveIncidentRequest brokerRequest = brokerClient.getSingleBrokerRequest();
assertThat(brokerRequest.getIntent()).isEqualTo(IncidentIntent.RESOLVE);
assertThat(brokerRequest.getValueType()).isEqualTo(ValueType.INCIDENT);
assertThat(brokerRequest.getKey()).isEqualTo(stub.getIncidentKey());
}
use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentResponse in project zeebe by camunda-cloud.
the class ResolveIncidentTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final ResolveIncidentStub stub = new ResolveIncidentStub();
stub.registerWith(brokerClient);
final ResolveIncidentRequest request = ResolveIncidentRequest.newBuilder().setIncidentKey(stub.getIncidentKey()).build();
// when
final ResolveIncidentResponse response = client.resolveIncident(request);
// then
assertThat(response).isNotNull();
final BrokerResolveIncidentRequest brokerRequest = brokerClient.getSingleBrokerRequest();
assertThat(brokerRequest.getIntent()).isEqualTo(IncidentIntent.RESOLVE);
assertThat(brokerRequest.getValueType()).isEqualTo(ValueType.INCIDENT);
assertThat(brokerRequest.getKey()).isEqualTo(stub.getIncidentKey());
}
Aggregations