public class EventSchedulerValidator extends Object
Constructor and Description |
---|
EventSchedulerValidator(StubEventScheduler eventScheduler)
Initializes the validator to validate the state of the given
eventScheduler . |
Modifier and Type | Method and Description |
---|---|
void |
assertNoScheduledEvents()
Asserts that no events are scheduled for publication.
|
void |
assertScheduledEventMatching(Duration duration,
org.hamcrest.Matcher<?> matcher)
Asserts that an event matching the given
matcher is scheduled for publication after the given
duration . |
void |
assertScheduledEventMatching(Instant scheduledTime,
org.hamcrest.Matcher<?> matcher)
Asserts that an event matching the given
matcher is scheduled for publication at the given
scheduledTime . |
public EventSchedulerValidator(StubEventScheduler eventScheduler)
eventScheduler
.eventScheduler
- The event scheduler to monitorpublic void assertScheduledEventMatching(Duration duration, org.hamcrest.Matcher<?> matcher)
matcher
is scheduled for publication after the given
duration
.duration
- The delay expected before the event is publishedmatcher
- The matcher that must match with the event scheduled at the given timepublic void assertScheduledEventMatching(Instant scheduledTime, org.hamcrest.Matcher<?> matcher)
matcher
is scheduled for publication at the given
scheduledTime
.scheduledTime
- the time at which the event should be publishedmatcher
- The matcher that must match with the event scheduled at the given timepublic void assertNoScheduledEvents()
Copyright © 2010–2018. All rights reserved.