Class EventSchedulerValidator
java.lang.Object
org.axonframework.test.eventscheduler.EventSchedulerValidator
Helper class for validating events scheduled in a given event scheduler.
- Since:
- 1.1
- Author:
- Allard Buijze
-
Constructor Summary
ConstructorsConstructorDescriptionEventSchedulerValidator(StubEventScheduler eventScheduler) Initializes the validator to validate the state of the giveneventScheduler. -
Method Summary
Modifier and TypeMethodDescriptionvoidassertNoScheduledEventMatching(Duration duration, org.hamcrest.Matcher<?> matcher) Asserts that no event matching the givenmatcherhas been scheduled after the givenduration.voidassertNoScheduledEventMatching(Instant scheduledTime, org.hamcrest.Matcher<?> matcher) Asserts that no event matching the givenmatcherhas been scheduled at the givenscheduledTime.voidAsserts that no events are scheduled for publication.voidassertScheduledEventMatching(Duration duration, org.hamcrest.Matcher<?> matcher) Asserts that an event matching the givenmatcheris scheduled for publication after the givenduration.voidassertScheduledEventMatching(Instant scheduledTime, org.hamcrest.Matcher<?> matcher) Asserts that an event matching the givenmatcheris scheduled for publication at the givenscheduledTime.
-
Constructor Details
-
EventSchedulerValidator
Initializes the validator to validate the state of the giveneventScheduler.- Parameters:
eventScheduler- The event scheduler to monitor
-
-
Method Details
-
assertScheduledEventMatching
Asserts that an event matching the givenmatcheris scheduled for publication after the givenduration.- Parameters:
duration- The delay expected before the event is publishedmatcher- The matcher that must match with the event scheduled at the given time
-
assertScheduledEventMatching
Asserts that an event matching the givenmatcheris scheduled for publication at the givenscheduledTime.- Parameters:
scheduledTime- the time at which the event should be publishedmatcher- The matcher that must match with the event scheduled at the given time
-
assertNoScheduledEventMatching
Asserts that no event matching the givenmatcherhas been scheduled after the givenduration.- Parameters:
duration- the delay within which no event matching the givenmatcheris expectedmatcher- the matcher defining the event which should not be scheduled after the givenduration
-
assertNoScheduledEventMatching
Asserts that no event matching the givenmatcherhas been scheduled at the givenscheduledTime.- Parameters:
scheduledTime- the time at which no event matching the givenmatcheris expectedmatcher- the matcher defining the event which should not be scheduled at the givenscheduledTime
-
assertNoScheduledEvents
public void assertNoScheduledEvents()Asserts that no events are scheduled for publication.
-