Class IncidentAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<IncidentAssert,Long>
io.camunda.zeebe.process.test.assertions.IncidentAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<IncidentAssert,,Long> org.assertj.core.api.Descriptable<IncidentAssert>,org.assertj.core.api.ExtensionPoints<IncidentAssert,Long>
Assertions for incidents. An incident is identified by its incident key.
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.assertj.core.api.StringAssertExtracts the error message for further assertionslongReturns the incident key (useful for resolving the incident)hasErrorMessage(String expectedErrorMessage) Asserts that the incident has the given error messagehasErrorType(io.camunda.zeebe.protocol.record.value.ErrorType expectedErrorType) Asserts that the incident has the given error typeAsserts that the incident is resolvedAsserts that the incident is not resolvedoccurredDuringJob(long expectedJobKey) Asserts that the incident is associated with the given joboccurredDuringJob(io.camunda.zeebe.client.api.response.ActivatedJob expectedJob) Asserts that the incident is associated with the given joboccurredOnElement(String expectedElementId) Asserts that the incident is associated with the given elementwasRaisedInProcessInstance(long expectedProcessInstanceKey) Asserts that the incident is associated with the given process instancewasRaisedInProcessInstance(io.camunda.zeebe.client.api.response.ProcessInstanceEvent expectedProcessInstance) Asserts that the incident is associated with the given process instanceMethods inherited from class org.assertj.core.api.AbstractAssert
areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs
-
Constructor Details
-
IncidentAssert
-
-
Method Details
-
getIncidentKey
public long getIncidentKey()Returns the incident key (useful for resolving the incident)- Returns:
- key of the incident
-
hasErrorType
public IncidentAssert hasErrorType(io.camunda.zeebe.protocol.record.value.ErrorType expectedErrorType) Asserts that the incident has the given error type- Parameters:
expectedErrorType- expected error type- Returns:
- this
IncidentAssert
-
hasErrorMessage
Asserts that the incident has the given error message- Parameters:
expectedErrorMessage- expected error message- Returns:
- this
IncidentAssert
-
extractingErrorMessage
public org.assertj.core.api.StringAssert extractingErrorMessage()Extracts the error message for further assertions- Returns:
StringAssertof error message
-
wasRaisedInProcessInstance
public IncidentAssert wasRaisedInProcessInstance(io.camunda.zeebe.client.api.response.ProcessInstanceEvent expectedProcessInstance) Asserts that the incident is associated with the given process instance- Parameters:
expectedProcessInstance- expected process instance- Returns:
- this
IncidentAssert
-
wasRaisedInProcessInstance
Asserts that the incident is associated with the given process instance- Parameters:
expectedProcessInstanceKey- key of expected process instance- Returns:
- this
IncidentAssert
-
occurredOnElement
Asserts that the incident is associated with the given element- Parameters:
expectedElementId- id of the element on which the incident was raised- Returns:
- this
IncidentAssert
-
occurredDuringJob
public IncidentAssert occurredDuringJob(io.camunda.zeebe.client.api.response.ActivatedJob expectedJob) Asserts that the incident is associated with the given job- Parameters:
expectedJob- job during which the incident was raised- Returns:
- this
IncidentAssert
-
occurredDuringJob
Asserts that the incident is associated with the given job- Parameters:
expectedJobKey- koy of job during which the incident was raised- Returns:
- this
IncidentAssert
-
isResolved
Asserts that the incident is resolved- Returns:
- this
IncidentAssert
-
isUnresolved
Asserts that the incident is not resolved- Returns:
- this
IncidentAssert
-