Package org.camunda.community.bpmndt.api
Class TimerEventHandler
java.lang.Object
org.camunda.community.bpmndt.api.TimerEventHandler
Fluent API to handle timer catch events.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncustomize(Consumer<TimerEventHandler> customizer) Customizes the handler, using the givenConsumerfunction.Verifies the user timer event's waiting state.verifyTimeDate(Consumer<LocalDateTime> timeDateConsumer) Verifies the timer event's due date, using a consumer.verifyTimeDateExpression(Consumer<String> timeDateExpressionConsumer) Verifies that the timer event has a specific date constant or FEEL expression (see "Timer" section), using a consumer function.verifyTimeDuration(Consumer<Duration> timeDurationConsumer) Verifies the timer event's calculated duration rounded to seconds, using a consumer.verifyTimeDurationExpression(Consumer<String> timeDurationExpressionConsumer) Verifies that the timer event has a specific duration constant or FEEL expression (see "Timer" section), using a consumer function.
-
Constructor Details
-
TimerEventHandler
-
TimerEventHandler
-
-
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.handleTimerEvent().customize(this::prepare);
- Parameters:
customizer- A function that accepts aTimerEventHandler.- Returns:
- The handler.
-
verify
public TimerEventHandler verify(Consumer<io.camunda.zeebe.process.test.assertions.ProcessInstanceAssert> verifier) Verifies the user timer event's waiting state.- Parameters:
verifier- Verifier that accepts anProcessInstanceAssertinstance.- Returns:
- The handler.
-
verifyTimeDate
Verifies the timer event's due date, using a consumer.- Parameters:
timeDateConsumer- A consumer asserting the due date.- Returns:
- The handler.
-
verifyTimeDateExpression
Verifies that the timer event has a specific date constant or FEEL expression (see "Timer" section), using a consumer function.- Parameters:
timeDateExpressionConsumer- A consumer asserting the date constant or expression.- Returns:
- The handler.
-
verifyTimeDuration
Verifies the timer event's calculated duration rounded to seconds, using a consumer.- Parameters:
timeDurationConsumer- A consumer asserting the duration.- Returns:
- The handler.
-
verifyTimeDurationExpression
public TimerEventHandler verifyTimeDurationExpression(Consumer<String> timeDurationExpressionConsumer) Verifies that the timer event has a specific duration constant or FEEL expression (see "Timer" section), using a consumer function.- Parameters:
timeDurationExpressionConsumer- A consumer asserting the duration constant or expression.- Returns:
- The handler.
-