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)
Deprecated.
in favor of
assertTriggeredDeadlines(Object...) |
void |
assertDeadlinesMetMatching(org.hamcrest.Matcher<? extends Iterable<?>> matcher)
Deprecated.
in favor of
assertTriggeredDeadlinesMatching(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. |
void |
assertTriggeredDeadlines(Object... expected)
Asserts that the given
expected deadlines have been triggered. |
void |
assertTriggeredDeadlinesMatching(org.hamcrest.Matcher<? extends Iterable<?>> matcher)
Asserts that the triggered deadlines match the given
matcher. |
void |
assertTriggeredDeadlinesOfType(Class<?>... expectedDeadlineTypes)
Asserts that the given
expectedDeadlineTypes have been triggered. |
void |
assertTriggeredDeadlinesWithName(String... expectedDeadlineNames)
Asserts that the given
expectedDeadlineNames have been triggered. |
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.StubDeadlineManagerpublic 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 scheduled@Deprecated public void assertDeadlinesMetMatching(org.hamcrest.Matcher<? extends Iterable<?>> matcher)
assertTriggeredDeadlinesMatching(Matcher)matcher.matcher - The matcher that will validate the actual deadlinespublic void assertTriggeredDeadlinesMatching(org.hamcrest.Matcher<? extends Iterable<?>> matcher)
matcher.matcher - the matcher that will validate the actual deadlines@Deprecated public void assertDeadlinesMet(Object... expected)
assertTriggeredDeadlines(Object...)expected deadlines have been met (which have passed in time).expected - The deadlines that must have been metpublic void assertTriggeredDeadlines(Object... expected)
expected deadlines have been triggered.expected - the deadlines that must have been triggeredpublic void assertTriggeredDeadlinesWithName(String... expectedDeadlineNames)
expectedDeadlineNames have been triggered. Matches the complete and exact sequence
of the given names with the result of StubDeadlineManager.getTriggeredDeadlines().expectedDeadlineNames - the deadline names that must have been triggeredpublic void assertTriggeredDeadlinesOfType(Class<?>... expectedDeadlineTypes)
expectedDeadlineTypes have been triggered. Matches the complete and exact sequence
of the given types with the result of StubDeadlineManager.getTriggeredDeadlines().expectedDeadlineTypes - the deadline types that must have been triggeredpublic void assertNoScheduledDeadlines()
Copyright © 2010–2023. All rights reserved.