Class JobAssert

java.lang.Object
org.assertj.core.api.AbstractAssert<JobAssert,io.camunda.zeebe.client.api.response.ActivatedJob>
io.camunda.zeebe.process.test.assertions.JobAssert
All Implemented Interfaces:
org.assertj.core.api.Assert<JobAssert,io.camunda.zeebe.client.api.response.ActivatedJob>, org.assertj.core.api.Descriptable<JobAssert>, org.assertj.core.api.ExtensionPoints<JobAssert,io.camunda.zeebe.client.api.response.ActivatedJob>

public class JobAssert extends org.assertj.core.api.AbstractAssert<JobAssert,io.camunda.zeebe.client.api.response.ActivatedJob>
Assertions for ActivatedJob instances
  • Field Summary

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

    actual, info, myself, objects, throwUnsupportedExceptionOnEquals
  • Constructor Summary

    Constructors
    Constructor
    Description
    JobAssert(io.camunda.zeebe.client.api.response.ActivatedJob actual, RecordStream recordStream)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.assertj.core.api.MapAssert<String,String>
    Extracts the header values of the activated job.
    Extracts the latest incident
    org.assertj.core.api.MapAssert<String,Object>
    Extracts the variables of the activated job.
    Asserts whether any incidents were raised for this job (regardless of whether these incidents are active or already resolved)
    hasBpmnProcessId(String expectedBpmnProcessId)
    Asserts that the activated job is associated to the given process id
    hasDeadline(long expectedDeadline, org.assertj.core.data.Offset<Long> offset)
    Asserts that the activated job has the given deadline
    hasElementId(String expectedElementId)
    Asserts that the activated job is associated to an element with the given id
    Asserts whether no incidents were raised for this job
    hasRetries(int expectedRetries)
    Asserts that the activated job has the given number of retries

    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

    • JobAssert

      public JobAssert(io.camunda.zeebe.client.api.response.ActivatedJob actual, RecordStream recordStream)
  • Method Details

    • hasElementId

      public JobAssert hasElementId(String expectedElementId)
      Asserts that the activated job is associated to an element with the given id
      Parameters:
      expectedElementId - element id to check
      Returns:
      this JobAssert
    • hasDeadline

      public JobAssert hasDeadline(long expectedDeadline, org.assertj.core.data.Offset<Long> offset)
      Asserts that the activated job has the given deadline
      Parameters:
      expectedDeadline - deadline in terms of System.currentTimeMillis()
      offset - offset in milliseconds to tolerate timing invariances
      Returns:
      this JobAssert
    • hasBpmnProcessId

      public JobAssert hasBpmnProcessId(String expectedBpmnProcessId)
      Asserts that the activated job is associated to the given process id
      Parameters:
      expectedBpmnProcessId - proces id to check
      Returns:
      this JobAssert
    • hasRetries

      public JobAssert hasRetries(int expectedRetries)
      Asserts that the activated job has the given number of retries
      Parameters:
      expectedRetries - expected retries
      Returns:
      this JobAssert
    • hasAnyIncidents

      public JobAssert hasAnyIncidents()
      Asserts whether any incidents were raised for this job (regardless of whether these incidents are active or already resolved)
      Returns:
      this JobAssert
    • hasNoIncidents

      public JobAssert hasNoIncidents()
      Asserts whether no incidents were raised for this job
      Returns:
      this JobAssert
    • extractingLatestIncident

      public IncidentAssert extractingLatestIncident()
      Extracts the latest incident
      Returns:
      IncidentAssert for the latest incident
    • extractingVariables

      public org.assertj.core.api.MapAssert<String,Object> extractingVariables()
      Extracts the variables of the activated job.
      Returns:
      this JobAssert
    • extractingHeaders

      public org.assertj.core.api.MapAssert<String,String> extractingHeaders()
      Extracts the header values of the activated job.
      Returns:
      this JobAssert