public class DeadlineManagerValidator extends Object
StubDeadlineManager
.Constructor and Description |
---|
DeadlineManagerValidator(StubDeadlineManager deadlineManager,
FieldFilter fieldFilter)
Instantiates this validator with
deadlineManager which is used for validation purposes and fieldFilter . |
Modifier and Type | Method and Description |
---|---|
void |
assertDeadlinesMet(Object... expected)
Asserts that the given
expected deadlines have been met (which have passed in time). |
void |
assertDeadlinesMetMatching(org.hamcrest.Matcher<? extends Iterable<?>> matcher)
Asserts that deadlines have been met (which have passed in time) match the given
matcher . |
void |
assertNoScheduledDeadlineMatching(org.hamcrest.Matcher<?> matcher)
Asserts that no deadline matching the given
matcher has been scheduled. |
void |
assertNoScheduledDeadlines()
Asserts that no deadlines are scheduled.
|
void |
assertScheduledDeadlineMatching(Duration duration,
org.hamcrest.Matcher<?> matcher)
Asserts that a deadline scheduled after given
duration matches the given matcher . |
void |
assertScheduledDeadlineMatching(Instant scheduledTime,
org.hamcrest.Matcher<?> matcher)
Asserts that a deadline scheduled at the given
scheduledTime matches the given matcher . |
Instant |
currentDateTime()
The current date time as stated by the configured
StubDeadlineManager . |
public DeadlineManagerValidator(StubDeadlineManager deadlineManager, FieldFilter fieldFilter)
deadlineManager
which is used for validation purposes and fieldFilter
.deadlineManager
- Stub implementation of deadline manager which keeps track of scheduled and met deadlinesfieldFilter
- Indicates whether any given Field should be accepted for processing or notpublic Instant currentDateTime()
StubDeadlineManager
.StubDeadlineManager
public void assertScheduledDeadlineMatching(Duration duration, org.hamcrest.Matcher<?> matcher)
duration
matches the given matcher
.duration
- the delay expected before the deadline is metmatcher
- the matcher that must match with the deadline scheduled at the given timepublic void assertScheduledDeadlineMatching(Instant scheduledTime, org.hamcrest.Matcher<?> matcher)
scheduledTime
matches the given matcher
.scheduledTime
- the time at which the deadline should be metmatcher
- the matcher that must match with the deadline scheduled at the given timepublic void assertNoScheduledDeadlineMatching(org.hamcrest.Matcher<?> matcher)
matcher
has been scheduled.matcher
- the matcher defining the deadline which should not be scheduledpublic void assertDeadlinesMetMatching(org.hamcrest.Matcher<? extends Iterable<?>> matcher)
matcher
.matcher
- The matcher that will validate the actual deadlinespublic void assertDeadlinesMet(Object... expected)
expected
deadlines have been met (which have passed in time).expected
- The deadlines that must have been metpublic void assertNoScheduledDeadlines()
Copyright © 2010–2022. All rights reserved.