Class ProcessAssert

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

public class ProcessAssert extends org.assertj.core.api.AbstractAssert<ProcessAssert,io.camunda.zeebe.client.api.response.Process>
Assertions for Process instances.

These asserts can be obtained via:


 final DeploymentEvent deploymentEvent =
         client.newDeployCommand().addResourceFile(file).send().join();

 final ProcessAssert processAssert =
         assertThat(deploymentEvent)
             .extractingProcessByBpmnProcessId(PROCESS_ID);
 
  • Field Summary

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

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

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

    Modifier and Type
    Method
    Description
    Asserts that the process has (had) any instances
    hasBpmnProcessId(String expectedBpmnProcessId)
    Asserts that the process has the given BPMN process ID
    hasInstances(long expectedNumberOfInstances)
    Asserts that the process has (had) the given number of instances
    Asserts that the process has (had) no instances
    hasResourceName(String expectedResourceName)
    Asserts that the process has the given resource name
    hasVersion(long expectedVersion)
    Asserts that the process has the given version

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

    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, 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
  • Constructor Details

    • ProcessAssert

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

    • hasBpmnProcessId

      public ProcessAssert hasBpmnProcessId(String expectedBpmnProcessId)
      Asserts that the process has the given BPMN process ID
      Parameters:
      expectedBpmnProcessId - BPMN process IDs to check
      Returns:
      this ProcessAssert
    • hasVersion

      public ProcessAssert hasVersion(long expectedVersion)
      Asserts that the process has the given version
      Parameters:
      expectedVersion - version to check
      Returns:
      this ProcessAssert
    • hasResourceName

      public ProcessAssert hasResourceName(String expectedResourceName)
      Asserts that the process has the given resource name
      Parameters:
      expectedResourceName - resource name to check
      Returns:
      this ProcessAssert
    • hasAnyInstances

      public ProcessAssert hasAnyInstances()
      Asserts that the process has (had) any instances
      Returns:
      this ProcessAssert
    • hasNoInstances

      public ProcessAssert hasNoInstances()
      Asserts that the process has (had) no instances
      Returns:
      this ProcessAssert
    • hasInstances

      public ProcessAssert hasInstances(long expectedNumberOfInstances)
      Asserts that the process has (had) the given number of instances
      Parameters:
      expectedNumberOfInstances - number of instances to check
      Returns:
      this ProcessAssert