Package org.axonframework.test.deadline
Class DeadlineManagerValidator
java.lang.Object
org.axonframework.test.deadline.DeadlineManagerValidator
Helps validation of deadline mechanism provided by
StubDeadlineManager.- Since:
- 3.3
- Author:
- Milan Savic
-
Constructor Summary
ConstructorsConstructorDescriptionDeadlineManagerValidator(StubDeadlineManager deadlineManager, FieldFilter fieldFilter) Instantiates this validator withdeadlineManagerwhich is used for validation purposes andfieldFilter. -
Method Summary
Modifier and TypeMethodDescriptionvoidassertDeadlinesMet(Object... expected) Deprecated.voidassertDeadlinesMetMatching(org.hamcrest.Matcher<? extends Iterable<?>> matcher) Deprecated.in favor ofassertTriggeredDeadlinesMatching(Matcher)voidassertNoScheduledDeadlineMatching(org.hamcrest.Matcher<?> matcher) Asserts that no deadline matching the givenmatcherhas been scheduled.voidAsserts that no deadlines are scheduled.voidassertScheduledDeadlineMatching(Duration duration, org.hamcrest.Matcher<?> matcher) Asserts that a deadline scheduled after givendurationmatches the givenmatcher.voidassertScheduledDeadlineMatching(Instant scheduledTime, org.hamcrest.Matcher<?> matcher) Asserts that a deadline scheduled at the givenscheduledTimematches the givenmatcher.voidassertTriggeredDeadlines(Object... expected) Asserts that the givenexpecteddeadlines have been triggered.voidassertTriggeredDeadlinesMatching(org.hamcrest.Matcher<? extends Iterable<?>> matcher) Asserts that the triggered deadlines match the givenmatcher.voidassertTriggeredDeadlinesOfType(Class<?>... expectedDeadlineTypes) Asserts that the givenexpectedDeadlineTypeshave been triggered.voidassertTriggeredDeadlinesWithName(String... expectedDeadlineNames) Asserts that the givenexpectedDeadlineNameshave been triggered.The current date time as stated by the configuredStubDeadlineManager.
-
Constructor Details
-
DeadlineManagerValidator
Instantiates this validator withdeadlineManagerwhich is used for validation purposes andfieldFilter.- Parameters:
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 not
-
-
Method Details
-
currentDateTime
The current date time as stated by the configuredStubDeadlineManager.- Returns:
- current date time as stated by the configured
StubDeadlineManager
-
assertScheduledDeadlineMatching
Asserts that a deadline scheduled after givendurationmatches the givenmatcher.- Parameters:
duration- the delay expected before the deadline is metmatcher- the matcher that must match with the deadline scheduled at the given time
-
assertScheduledDeadlineMatching
Asserts that a deadline scheduled at the givenscheduledTimematches the givenmatcher.- Parameters:
scheduledTime- the time at which the deadline should be metmatcher- the matcher that must match with the deadline scheduled at the given time
-
assertNoScheduledDeadlineMatching
public void assertNoScheduledDeadlineMatching(org.hamcrest.Matcher<?> matcher) Asserts that no deadline matching the givenmatcherhas been scheduled.- Parameters:
matcher- the matcher defining the deadline which should not be scheduled
-
assertDeadlinesMetMatching
@Deprecated public void assertDeadlinesMetMatching(org.hamcrest.Matcher<? extends Iterable<?>> matcher) Deprecated.in favor ofassertTriggeredDeadlinesMatching(Matcher)Asserts that deadlines have been met (which have passed in time) match the givenmatcher.- Parameters:
matcher- The matcher that will validate the actual deadlines
-
assertTriggeredDeadlinesMatching
Asserts that the triggered deadlines match the givenmatcher.- Parameters:
matcher- the matcher that will validate the actual deadlines
-
assertDeadlinesMet
Deprecated.in favor ofassertTriggeredDeadlines(Object...)Asserts that the givenexpecteddeadlines have been met (which have passed in time).- Parameters:
expected- The deadlines that must have been met
-
assertTriggeredDeadlines
Asserts that the givenexpecteddeadlines have been triggered.- Parameters:
expected- the deadlines that must have been triggered
-
assertTriggeredDeadlinesWithName
Asserts that the givenexpectedDeadlineNameshave been triggered. Matches the complete and exact sequence of the given names with the result ofStubDeadlineManager.getTriggeredDeadlines().- Parameters:
expectedDeadlineNames- the deadline names that must have been triggered
-
assertTriggeredDeadlinesOfType
Asserts that the givenexpectedDeadlineTypeshave been triggered. Matches the complete and exact sequence of the given types with the result ofStubDeadlineManager.getTriggeredDeadlines().- Parameters:
expectedDeadlineTypes- the deadline types that must have been triggered
-
assertNoScheduledDeadlines
public void assertNoScheduledDeadlines()Asserts that no deadlines are scheduled.
-
assertTriggeredDeadlines(Object...)