Package org.camunda.community.bpmndt.api
Class CustomMultiInstanceHandler
java.lang.Object
org.camunda.community.bpmndt.api.CustomMultiInstanceHandler
Fluent API to handle multi instances and multi instance scopes, using custom code - see
execute(BiConsumer).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncustomize(Consumer<CustomMultiInstanceHandler> customizer) Customizes the handler, using the givenConsumerfunction.voidexecute(BiConsumer<TestCaseInstance, Long> action) Executes a custom action that handles the multi instance or the multi instance scope.Verifies the multi instance state.Verifies that the multi instance loop execution is done in parallel.Verifies that the multi instance loop is sequentially executed.
-
Constructor Details
-
CustomMultiInstanceHandler
-
CustomMultiInstanceHandler
-
-
Method Details
-
customize
Customizes the handler, using the givenConsumerfunction. This method can be used to apply a common customization needed for different test cases.tc.handleMultiInstance().customize(this::prepare);
- Parameters:
customizer- A function that accepts aCustomMultiInstanceHandler.- Returns:
- The handler.
-
execute
Executes a custom action that handles the multi instance or the multi instance scope.- Parameters:
action- A specific action that accepts aTestCaseInstanceand the related process instance key.
-
verify
public CustomMultiInstanceHandler verify(Consumer<io.camunda.zeebe.process.test.assertions.ProcessInstanceAssert> verifier) Verifies the multi instance state.Please note: An application specific job worker may have already completed the related job and updated some variables.
- Parameters:
verifier- Verifier that accepts anProcessInstanceAssertinstance.- Returns:
- The handler.
-
verifyParallel
Verifies that the multi instance loop execution is done in parallel.- Returns:
- The handler.
-
verifySequential
Verifies that the multi instance loop is sequentially executed.- Returns:
- The handler.
-