Class ProcessInstanceAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<ProcessInstanceAssert,Long>
io.camunda.zeebe.process.test.assertions.ProcessInstanceAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<ProcessInstanceAssert,,Long> org.assertj.core.api.Descriptable<ProcessInstanceAssert>,org.assertj.core.api.ExtensionPoints<ProcessInstanceAssert,Long>
public class ProcessInstanceAssert
extends org.assertj.core.api.AbstractAssert<ProcessInstanceAssert,Long>
Assertions for process instances. A process instance is identified by its process instance key.
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExtracts the latest called process.extractingLatestCalledProcess(String processId) Extracts the latest called process with a provided processId.Extracts the latest incidentAsserts whether any incidents were raised for this process instance (regardless of whether these incidents are active or already resolved)Asserts whether this process has called another processhasCalledProcess(String processId) Asserts whether this process has called another specific processhasCorrelatedMessageByCorrelationKey(String correlationKey, int times) Verifies the expectation that a message with a given correlation key has been correlated a given amount of times.hasCorrelatedMessageByName(String messageName, int times) Verifies the expectation that a message with a given name has been correlated a given amount of times.Asserts whether no incidents were raised for this process instanceAsserts whether this process has not called another processhasNotCalledProcess(String processId) Asserts whether this process has not called another specific processhasNotPassedElement(String elementId) Verifies the expectation that the process instance has not passed an element with a specific element id.hasPassedElement(String elementId) Verifies the expectation that the process instance has passed an element with a specific element id exactly one time.hasPassedElement(String elementId, int times) Verifies the expectation that the process instance has passed an element with a specific element id exactly N amount of times.hasPassedElementsInOrder(String... elementIds) Verifies the expectation that the process instance has passed the given elements in order.hasVariable(String name) hasVariableWithValue(String name, Object value) Verifies the process instance has a variable with a specific value.isActive()Verifies the expectation that the process instance is active.Verifies the expectation that the process instance is completed.Verifies the expectation that the process instance is not completed.Verifies the expectation that the process instance is not terminated.isNotWaitingAtElements(String... elementIds) Verifies the expectation that the process instance is currently not waiting at one or more specified elements.isNotWaitingForMessages(String... messageNames) Verifies the expectation that the process instance is currently not waiting to receive one or more specified messages.Verifies the expectation that the process instance is started.Verifies the expectation that the process instance is terminated.isWaitingAtElements(String... elementIds) Verifies the expectation that the process instance is currently waiting at one or more specified elements.isWaitingExactlyAtElements(String... elementIdsVarArg) Verifies the expectation that the process instance is currently waiting at the specified elements, and not at any other element.isWaitingForMessages(String... messageNames) Verifies the expectation that the process instance is currently waiting to receive one or more specified messages.Methods inherited from class org.assertj.core.api.AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, 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, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, 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, describedAs
-
Constructor Details
-
ProcessInstanceAssert
-
-
Method Details
-
isStarted
Verifies the expectation that the process instance is started. This will also be true when the process has been completed or terminated.- Returns:
- this
ProcessInstanceAssert
-
isActive
Verifies the expectation that the process instance is active.- Returns:
- this
ProcessInstanceAssert
-
isCompleted
Verifies the expectation that the process instance is completed.- Returns:
- this
ProcessInstanceAssert
-
isNotCompleted
Verifies the expectation that the process instance is not completed.- Returns:
- this
ProcessInstanceAssert
-
isTerminated
Verifies the expectation that the process instance is terminated.- Returns:
- this
ProcessInstanceAssert
-
isNotTerminated
Verifies the expectation that the process instance is not terminated.- Returns:
- this
ProcessInstanceAssert
-
hasPassedElement
Verifies the expectation that the process instance has passed an element with a specific element id exactly one time.- Parameters:
elementId- The id of the element- Returns:
- this
ProcessInstanceAssert
-
hasNotPassedElement
Verifies the expectation that the process instance has not passed an element with a specific element id.- Parameters:
elementId- The id of the element- Returns:
- this
ProcessInstanceAssert
-
hasPassedElement
Verifies the expectation that the process instance has passed an element with a specific element id exactly N amount of times.- Parameters:
elementId- The id of the elementtimes- The amount of times the element should be passed- Returns:
- this
ProcessInstanceAssert
-
hasPassedElementsInOrder
Verifies the expectation that the process instance has passed the given elements in order.- Parameters:
elementIds- The element ids- Returns:
- this
ProcessInstanceAssert
-
isWaitingAtElements
Verifies the expectation that the process instance is currently waiting at one or more specified elements.- Parameters:
elementIds- The ids of the elements- Returns:
- this
ProcessInstanceAssert
-
isNotWaitingAtElements
Verifies the expectation that the process instance is currently not waiting at one or more specified elements.- Parameters:
elementIds- The ids of the elements- Returns:
- this
ProcessInstanceAssert
-
isWaitingExactlyAtElements
Verifies the expectation that the process instance is currently waiting at the specified elements, and not at any other element.- Parameters:
elementIdsVarArg- The ids of the elements- Returns:
- this
ProcessInstanceAssert
-
isWaitingForMessages
Verifies the expectation that the process instance is currently waiting to receive one or more specified messages.- Parameters:
messageNames- Names of the messages- Returns:
- this
ProcessInstanceAssert
-
isNotWaitingForMessages
Verifies the expectation that the process instance is currently not waiting to receive one or more specified messages.- Parameters:
messageNames- Names of the messages- Returns:
- this
ProcessInstanceAssert
-
hasVariable
- Parameters:
name- The name of the variable- Returns:
- this $
ProcessInstanceAssert
-
hasVariableWithValue
Verifies the process instance has a variable with a specific value.- Parameters:
name- The name of the variablevalue- The value of the variable- Returns:
- this $
ProcessInstanceAssert
-
hasAnyIncidents
Asserts whether any incidents were raised for this process instance (regardless of whether these incidents are active or already resolved)- Returns:
- this
ProcessInstanceAssert
-
hasNoIncidents
Asserts whether no incidents were raised for this process instance- Returns:
- this
ProcessInstanceAssert
-
extractingLatestIncident
Extracts the latest incident- Returns:
IncidentAssertfor the latest incident
-
extractingLatestCalledProcess
Extracts the latest called process. This will result in a failed assertion when no process has been called. When a multi-instance loop is in your process, you might get an empty process, as the multi-instance loop makes the processes it needs + one empty process.- Returns:
ProcessInstanceAssertfor the called process
-
extractingLatestCalledProcess
Extracts the latest called process with a provided processId. This will result in a failed assertion when the process has not been called. When a multi-instance loop is in your process, you might get an empty process, as the multi-instance loop makes the processes it needs + one empty process.- Parameters:
processId- The id of the process that should be called- Returns:
ProcessInstanceAssertfor the called process
-
hasCalledProcess
Asserts whether this process has called another process- Returns:
- this
ProcessInstanceAssert
-
hasNotCalledProcess
Asserts whether this process has not called another process- Returns:
- this
ProcessInstanceAssert
-
hasCalledProcess
Asserts whether this process has called another specific process- Parameters:
processId- The id of the process that should have been called- Returns:
- this
ProcessInstanceAssert
-
hasNotCalledProcess
Asserts whether this process has not called another specific process- Parameters:
processId- The id of the process that should have been called- Returns:
- this
ProcessInstanceAssert
-