Class BpmnAssert
java.lang.Object
io.camunda.zeebe.process.test.assertions.BpmnAssert
This class manages all the entry points for the specific assertions.
For example when starting a process instance:
ProcessInstanceEvent event = client.newCreateInstanceCommand()
.bpmnProcessId("processId")
.latestVersion()
.send()
.join();
ProcessInstanceAssert assertions = BpmnAssert.assertThat(event);
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JobAssertassertThat(io.camunda.zeebe.client.api.response.ActivatedJob activatedJob) Creates a new instance ofJobAssert.static DeploymentAssertassertThat(io.camunda.zeebe.client.api.response.DeploymentEvent deploymentEvent) Creates a new instance ofDeploymentAssert.static ProcessInstanceAssertassertThat(io.camunda.zeebe.client.api.response.ProcessInstanceEvent instanceEvent) Creates a new instance ofProcessInstanceAssert.static ProcessInstanceAssertassertThat(io.camunda.zeebe.client.api.response.ProcessInstanceResult instanceResult) Creates a new instance ofProcessInstanceAssert.static MessageAssertassertThat(io.camunda.zeebe.client.api.response.PublishMessageResponse publishMessageResponse) Creates a new instance ofPublishMessageResponse.static ProcessInstanceAssertassertThat(InspectedProcessInstance inspectedProcessInstance) Creates a new instance ofProcessInstanceAssert.static RecordStreamGets theRecordStreamthat is stored in theThreadLocalfor the current thread.static voidinitRecordStream(RecordStream recordStream) Initializes aRecordStream.static voidRemoves theRecordStreamfrom theThreadLocal.
-
Constructor Details
-
BpmnAssert
public BpmnAssert()
-
-
Method Details
-
initRecordStream
Initializes aRecordStream. TheRecordStreamwill be stored in aThreadLocaland thus will only be accessible in the current thread. This will be managed for you if you're using the @ZeebeProcessTest annotation.- Parameters:
recordStream- theRecordStream
-
resetRecordStream
public static void resetRecordStream()Removes theRecordStreamfrom theThreadLocal. -
getRecordStream
Gets theRecordStreamthat is stored in theThreadLocalfor the current thread. This will be managed for you if you're using the @ZeebeProcessTest annotation.- Returns:
- the
RecordStreamstored for this thread - Throws:
AssertionError- if noRecordStreamhas been initialized for the current thread
-
assertThat
public static ProcessInstanceAssert assertThat(io.camunda.zeebe.client.api.response.ProcessInstanceEvent instanceEvent) Creates a new instance ofProcessInstanceAssert.- Parameters:
instanceEvent- the event received when starting a process instance- Returns:
- the created assertion object
-
assertThat
public static ProcessInstanceAssert assertThat(io.camunda.zeebe.client.api.response.ProcessInstanceResult instanceResult) Creates a new instance ofProcessInstanceAssert.- Parameters:
instanceResult- the event received when starting a process instance- Returns:
- the created assertion object
-
assertThat
Creates a new instance ofProcessInstanceAssert.- Parameters:
inspectedProcessInstance- theInspectedProcessInstancereceived from theProcessInstanceInspections- Returns:
- the created assertion object
-
assertThat
Creates a new instance ofJobAssert.- Parameters:
activatedJob- the response received when activating a job- Returns:
- the created assertion object
-
assertThat
public static DeploymentAssert assertThat(io.camunda.zeebe.client.api.response.DeploymentEvent deploymentEvent) Creates a new instance ofDeploymentAssert.- Parameters:
deploymentEvent- the event received when deploying a process- Returns:
- the created assertion object
-
assertThat
public static MessageAssert assertThat(io.camunda.zeebe.client.api.response.PublishMessageResponse publishMessageResponse) Creates a new instance ofPublishMessageResponse.- Parameters:
publishMessageResponse- the response received when publishing a message- Returns:
- the created assertion object
-