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 |
assertNoScheduledEventMatching(Duration duration,
org.hamcrest.Matcher<?> matcher)
Asserts that no event matching the given
matcher has been scheduled after the given duration . |
void |
assertNoScheduledEventMatching(Instant scheduledTime,
org.hamcrest.Matcher<?> matcher)
Asserts that no event matching the given
matcher has been scheduled at the given scheduledTime . |
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 assertNoScheduledEventMatching(Duration duration, org.hamcrest.Matcher<?> matcher)
matcher
has been scheduled after the given duration
.duration
- the delay within which no event matching the given matcher
is expectedmatcher
- the matcher defining the event which should not be scheduled after the given duration
public void assertNoScheduledEventMatching(Instant scheduledTime, org.hamcrest.Matcher<?> matcher)
matcher
has been scheduled at the given scheduledTime
.scheduledTime
- the time at which no event matching the given matcher
is expectedmatcher
- the matcher defining the event which should not be scheduled at the given scheduledTime
public void assertNoScheduledEvents()
Copyright © 2010–2020. All rights reserved.