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>

public class IncidentAssert extends org.assertj.core.api.AbstractAssert<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
    Constructor
    Description
    IncidentAssert(long incidentKey, RecordStream recordStream)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.assertj.core.api.StringAssert
    Extracts the error message for further assertions
    long
    Returns the incident key (useful for resolving the incident)
    hasErrorMessage(String expectedErrorMessage)
    Asserts that the incident has the given error message
    hasErrorType(io.camunda.zeebe.protocol.record.value.ErrorType expectedErrorType)
    Asserts that the incident has the given error type
    Asserts that the incident is resolved
    Asserts that the incident is not resolved
    occurredDuringJob(long expectedJobKey)
    Asserts that the incident is associated with the given job
    occurredDuringJob(io.camunda.zeebe.client.api.response.ActivatedJob expectedJob)
    Asserts that the incident is associated with the given job
    occurredOnElement(String expectedElementId)
    Asserts that the incident is associated with the given element
    wasRaisedInProcessInstance(long expectedProcessInstanceKey)
    Asserts that the incident is associated with the given process instance
    wasRaisedInProcessInstance(io.camunda.zeebe.client.api.response.ProcessInstanceEvent expectedProcessInstance)
    Asserts that the incident is associated with the given process instance

    Methods inherited from class org.assertj.core.api.AbstractAssert

    areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, 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, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.assertj.core.api.Descriptable

    as, as, as, describedAs, describedAs
  • Constructor Details

    • IncidentAssert

      public IncidentAssert(long incidentKey, RecordStream recordStream)
  • 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

      public IncidentAssert hasErrorMessage(String expectedErrorMessage)
      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:
      StringAssert of 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

      public IncidentAssert wasRaisedInProcessInstance(long expectedProcessInstanceKey)
      Asserts that the incident is associated with the given process instance
      Parameters:
      expectedProcessInstanceKey - key of expected process instance
      Returns:
      this IncidentAssert
    • occurredOnElement

      public IncidentAssert occurredOnElement(String expectedElementId)
      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

      public IncidentAssert occurredDuringJob(long expectedJobKey)
      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

      public IncidentAssert isResolved()
      Asserts that the incident is resolved
      Returns:
      this IncidentAssert
    • isUnresolved

      public IncidentAssert isUnresolved()
      Asserts that the incident is not resolved
      Returns:
      this IncidentAssert