Search in sources :

Example 1 with ResolveIncidentResponse

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());
}
Also used : ResolveIncidentRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentRequest) BrokerResolveIncidentRequest(io.camunda.zeebe.gateway.impl.broker.request.BrokerResolveIncidentRequest) BrokerResolveIncidentRequest(io.camunda.zeebe.gateway.impl.broker.request.BrokerResolveIncidentRequest) ResolveIncidentResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentResponse) GatewayTest(io.camunda.zeebe.gateway.api.util.GatewayTest) Test(org.junit.Test)

Example 2 with ResolveIncidentResponse

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());
}
Also used : ResolveIncidentRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentRequest) BrokerResolveIncidentRequest(io.camunda.zeebe.gateway.impl.broker.request.BrokerResolveIncidentRequest) BrokerResolveIncidentRequest(io.camunda.zeebe.gateway.impl.broker.request.BrokerResolveIncidentRequest) ResolveIncidentResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentResponse) GatewayTest(io.camunda.zeebe.gateway.api.util.GatewayTest) Test(org.junit.Test)

Example 3 with ResolveIncidentResponse

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());
}
Also used : ResolveIncidentRequest(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentRequest) BrokerResolveIncidentRequest(io.camunda.zeebe.gateway.impl.broker.request.BrokerResolveIncidentRequest) BrokerResolveIncidentRequest(io.camunda.zeebe.gateway.impl.broker.request.BrokerResolveIncidentRequest) ResolveIncidentResponse(io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentResponse) GatewayTest(io.camunda.zeebe.gateway.api.util.GatewayTest) Test(org.junit.Test)

Aggregations

GatewayTest (io.camunda.zeebe.gateway.api.util.GatewayTest)3 BrokerResolveIncidentRequest (io.camunda.zeebe.gateway.impl.broker.request.BrokerResolveIncidentRequest)3 ResolveIncidentRequest (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentRequest)3 ResolveIncidentResponse (io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ResolveIncidentResponse)3 Test (org.junit.Test)3