Search in sources :

Example 1 with ErrorType

use of io.camunda.zeebe.protocol.record.value.ErrorType in project zeebe-process-test by camunda.

the class IncidentAssert method hasErrorType.

/**
 * Asserts that the incident has the given error type
 *
 * @param expectedErrorType expected error type
 * @return this {@link IncidentAssert}
 */
public IncidentAssert hasErrorType(final ErrorType expectedErrorType) {
    assertThat(expectedErrorType).describedAs("Parameter 'expectedErrorType").isNotNull();
    final IncidentRecordValue record = getIncidentCreatedRecordValue();
    final ErrorType actualErrorType = record.getErrorType();
    assertThat(actualErrorType).withFailMessage("Error type was not '%s' but was '%s' instead.%s", expectedErrorType, actualErrorType, composeIncidentDetails()).isEqualTo(expectedErrorType);
    return this;
}
Also used : ErrorType(io.camunda.zeebe.protocol.record.value.ErrorType) IncidentRecordValue(io.camunda.zeebe.protocol.record.value.IncidentRecordValue)

Example 2 with ErrorType

use of io.camunda.zeebe.protocol.record.value.ErrorType in project zeebe-process-test by camunda-cloud.

the class IncidentAssert method hasErrorType.

/**
 * Asserts that the incident has the given error type
 *
 * @param expectedErrorType expected error type
 * @return this {@link IncidentAssert}
 */
public IncidentAssert hasErrorType(final ErrorType expectedErrorType) {
    assertThat(expectedErrorType).describedAs("Parameter 'expectedErrorType").isNotNull();
    final IncidentRecordValue record = getIncidentCreatedRecordValue();
    final ErrorType actualErrorType = record.getErrorType();
    assertThat(actualErrorType).withFailMessage("Error type was not '%s' but was '%s' instead.%s", expectedErrorType, actualErrorType, composeIncidentDetails()).isEqualTo(expectedErrorType);
    return this;
}
Also used : ErrorType(io.camunda.zeebe.protocol.record.value.ErrorType) IncidentRecordValue(io.camunda.zeebe.protocol.record.value.IncidentRecordValue)

Aggregations

ErrorType (io.camunda.zeebe.protocol.record.value.ErrorType)2 IncidentRecordValue (io.camunda.zeebe.protocol.record.value.IncidentRecordValue)2