Interface FixtureExecutionResult
- Since:
- 1.1
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionexpectActiveSagas(int expected) Asserts that the repository contains the givenexpectedamount of active Sagas.expectAssociationWith(String associationKey, Object associationValue) Asserts that at least one of the active Sagas is associated with the givenassociationKeyandassociationValue.expectDeadlinesMet(Object... expected) Deprecated.expectDeadlinesMetMatching(org.hamcrest.Matcher<? extends List<?>> matcher) Deprecated.in favor ofexpectTriggeredDeadlinesMatching(Matcher)expectDispatchedCommands(Object... commands) Asserts that the Sagas dispatched the given commands, in the exact sequence given.expectDispatchedCommandsMatching(org.hamcrest.Matcher<? extends List<? super CommandMessage>> matcher) Asserts that the Sagas dispatched commands matching the givenmatcher.expectNoAssociationWith(String associationKey, Object associationValue) Asserts that none of the active Sagas is associated with the givenassociationKeyandassociationValue.Asserts that the Sagas dispatched no commands.expectNoScheduledDeadline(Duration durationToScheduledTime, Object deadline) Asserts that no deadline equal to the givendeadlinehas been scheduled after the givendurationToScheduledTime.expectNoScheduledDeadline(Instant scheduledTime, Object deadline) Asserts that no deadline equal to the givendeadlinehas been scheduled at the givenscheduledTime.expectNoScheduledDeadline(Instant from, Instant to, Object deadline) Asserts that no deadline equal to the givendeadlinehas been scheduled between thetoandfromtimes, wheretoandfromare inclusive.expectNoScheduledDeadlineMatching(Duration durationToScheduledTime, org.hamcrest.Matcher<? super DeadlineMessage> matcher) Asserts that no deadline matching the givenmatchershould be scheduled after the givendurationToScheduledTime.expectNoScheduledDeadlineMatching(Instant from, Instant to, org.hamcrest.Matcher<? super DeadlineMessage> matcher) Asserts that no deadline matching the givenmatcherhas been scheduled between thetoandfromtimes, wheretoandfromare inclusive.expectNoScheduledDeadlineMatching(Instant scheduledTime, org.hamcrest.Matcher<? super DeadlineMessage> matcher) Asserts that no deadline matching the givenmatcherhas been scheduled at the givenscheduledTime.expectNoScheduledDeadlineMatching(org.hamcrest.Matcher<? super DeadlineMessage> matcher) Asserts that no deadline matching the givenmatcheris scheduled.expectNoScheduledDeadlineOfType(Duration durationToScheduledTime, Class<?> deadlineType) Asserts that no deadline of the givendeadlineTypehas been scheduled at the givendurationToScheduledTime.expectNoScheduledDeadlineOfType(Instant scheduledTime, Class<?> deadlineType) Asserts that no deadline with the givendeadlineTypehas been scheduled at the givenscheduledTime.expectNoScheduledDeadlineOfType(Instant from, Instant to, Class<?> deadlineType) Asserts that no deadline with the givendeadlineTypehas been scheduled between thetoandfromtimes, wheretoandfromare inclusive.Asserts that no deadlines are scheduled.expectNoScheduledDeadlineWithName(Duration durationToScheduledTime, String deadlineName) Asserts that no deadline with the givendeadlineNamehas been scheduled after the givendurationToScheduledTime.expectNoScheduledDeadlineWithName(Instant scheduledTime, String deadlineName) Asserts that no deadline with the givendeadlineNamehas been scheduled at the givenscheduledTime.expectNoScheduledDeadlineWithName(Instant from, Instant to, String deadlineName) Asserts that no deadline with the givendeadlineNamehas been scheduled between thetoandfromtimes, wheretoandfromare inclusive.expectNoScheduledEvent(Duration durationToScheduledTime, Object event) Asserts that the giveneventis not scheduled after the given duration.expectNoScheduledEvent(Instant scheduledTime, Object event) Asserts that the giveneventis not scheduled at the givenscheduledTime.expectNoScheduledEventMatching(Duration durationToScheduledTime, org.hamcrest.Matcher<? super EventMessage> matcher) Asserts that no event matching the givenmatcheris scheduled after the given duration.expectNoScheduledEventMatching(Instant scheduledTime, org.hamcrest.Matcher<? super EventMessage> matcher) Asserts that no event matching the givenmatcheris scheduled at the givenscheduledTime.expectNoScheduledEventOfType(Duration durationToScheduledTime, Class<?> eventType) Asserts that no event of the giveneventTypeis scheduled after the given duration.expectNoScheduledEventOfType(Instant scheduledTime, Class<?> eventType) Asserts that no event of the giveneventTypeis scheduled at the givenscheduledTime.Asserts that no events are scheduled.expectPublishedEvents(Object... expected) Asserts that the Sagas published the given events, in the exact sequence given.expectPublishedEventsMatching(org.hamcrest.Matcher<? extends List<? super EventMessage>> matcher) Asserts that the Sagas published events matching the givenmatcher.expectScheduledDeadline(Duration duration, Object deadline) Asserts that a deadline equal to the givendeadlinehas been scheduled after the givenduration.expectScheduledDeadline(Instant scheduledTime, Object deadline) Asserts that a deadline equal to the givendeadlinehas been scheduled at the givenscheduledTime.expectScheduledDeadlineMatching(Duration duration, org.hamcrest.Matcher<? super DeadlineMessage> matcher) Asserts that a deadline scheduled after givendurationmatches the givenmatcher.expectScheduledDeadlineMatching(Instant scheduledTime, org.hamcrest.Matcher<? super DeadlineMessage> matcher) Asserts that a deadline matching the givenmatcherhas been scheduled at the givenscheduledTime.expectScheduledDeadlineOfType(Duration duration, Class<?> deadlineType) Asserts that a deadline of the givendeadlineTypehas been scheduled after the givenduration.expectScheduledDeadlineOfType(Instant scheduledTime, Class<?> deadlineType) Asserts that a deadline of the givendeadlineTypehas been scheduled at the givenscheduledTime.expectScheduledDeadlineWithName(Duration duration, String deadlineName) Asserts that a deadline with the givendeadlineNamehas been scheduled after the givenduration.expectScheduledDeadlineWithName(Instant scheduledTime, String deadlineName) Asserts that a deadline with the givendeadlineNamehas been scheduled at the givenscheduledTime.expectScheduledEvent(Duration duration, Object applicationEvent) Asserts that the givenapplicationEventis scheduled after the givenduration.expectScheduledEvent(Instant scheduledTime, Object applicationEvent) Asserts that the givenapplicationEventis scheduled at the givenscheduledTime.expectScheduledEventMatching(Duration duration, org.hamcrest.Matcher<? super EventMessage> matcher) Asserts that an event matching the givenmatcheris scheduled after the givenduration.expectScheduledEventMatching(Instant scheduledTime, org.hamcrest.Matcher<? super EventMessage> matcher) Asserts that an event matching the givenmatcheris scheduled at the givenscheduledTime.expectScheduledEventOfType(Duration duration, Class<?> eventType) Asserts that an event of the giveneventTypeis scheduled after the givenduration.expectScheduledEventOfType(Instant scheduledTime, Class<?> eventType) Asserts that an event of the giveneventTypeis scheduled at the givenscheduledTime.Asserts that the Saga handled the "when" event without failing.expectTriggeredDeadlines(Object... expected) Asserts that givenexpecteddeadlines have been triggered.expectTriggeredDeadlinesMatching(org.hamcrest.Matcher<? extends List<?>> matcher) Asserts that deadlines matching the givenmatcherhave been triggered for this saga.expectTriggeredDeadlinesOfType(Class<?>... expectedDeadlineTypes) Asserts that the givenexpectedDeadlineTypeshave been triggered.expectTriggeredDeadlinesWithName(String... expectedDeadlineNames) Asserts that the givenexpectedDeadlineNameshave been triggered.
-
Method Details
-
expectActiveSagas
Asserts that the repository contains the givenexpectedamount of active Sagas.Counts every Saga in the store, whatever its type, as Axon Framework 4 did. That makes this assertion asymmetric with
expectAssociationWith(String, Object), which does filter on the Saga type under test.- Parameters:
expected- the expected number of active Sagas in this fixture- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
AxonAssertionError- when the store holds another number of Sagas
-
expectAssociationWith
Asserts that at least one of the active Sagas is associated with the givenassociationKeyandassociationValue.The
associationValueis compared by itsstring representation, as Axon Framework 4 did.- Parameters:
associationKey- the key of the associationassociationValue- the value of the association- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
AxonAssertionError- when no Saga holds the association
-
expectNoAssociationWith
Asserts that none of the active Sagas is associated with the givenassociationKeyandassociationValue.The
associationValueis compared by itsstring representation, as Axon Framework 4 did.- Parameters:
associationKey- the key of the associationassociationValue- the value of the association- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
AxonAssertionError- when a Saga holds the association
-
expectDispatchedCommands
Asserts that the Sagas dispatched the given commands, in the exact sequence given.Each element is either a
CommandMessage, in which case payload and metadata are both compared, or a payload, in which case only the payload is compared.- Parameters:
commands- the commands expected to have been dispatched- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
AxonAssertionError- when another set of commands was dispatched
-
expectDispatchedCommandsMatching
FixtureExecutionResult expectDispatchedCommandsMatching(org.hamcrest.Matcher<? extends List<? super CommandMessage>> matcher) Asserts that the Sagas dispatched commands matching the givenmatcher.- Parameters:
matcher- the matcher validating the dispatched commands- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
AxonAssertionError- when the dispatched commands do not match
-
expectNoDispatchedCommands
FixtureExecutionResult expectNoDispatchedCommands()Asserts that the Sagas dispatched no commands.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
AxonAssertionError- when any command was dispatched
-
expectPublishedEvents
Asserts that the Sagas published the given events, in the exact sequence given.Each element is either an
EventMessageor a payload; a message is unwrapped to its payload, so only payloads are compared and metadata is not, as in Axon Framework 4. The event that drove the "when" phase is not part of this set, since the test published it rather than the Saga.- Parameters:
expected- the events expected to have been published- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
AxonAssertionError- when another set of events was published
-
expectPublishedEventsMatching
FixtureExecutionResult expectPublishedEventsMatching(org.hamcrest.Matcher<? extends List<? super EventMessage>> matcher) Asserts that the Sagas published events matching the givenmatcher.The event that drove the "when" phase is not part of the set the matcher sees, since the test published it rather than the Saga.
- Parameters:
matcher- the matcher validating the published events- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
AxonAssertionError- when the published events do not match
-
expectSuccessfulHandlerExecution
FixtureExecutionResult expectSuccessfulHandlerExecution()Asserts that the Saga handled the "when" event without failing.Unlike Axon Framework 4, a failing
@SagaEventHandlerpropagates by default rather than being logged and swallowed, so this assertion holds unless the Saga threw. A Saga that suppresses its own failures with an@ExceptionHandlerpasses it, as it did in Axon Framework 4.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
AxonAssertionError- when handling the "when" event failed
-
expectScheduledEventMatching
FixtureExecutionResult expectScheduledEventMatching(Duration duration, org.hamcrest.Matcher<? super EventMessage> matcher) Asserts that an event matching the givenmatcheris scheduled after the givenduration.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectScheduledEvent
Asserts that the givenapplicationEventis scheduled after the givenduration.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectScheduledEventOfType
Asserts that an event of the giveneventTypeis scheduled after the givenduration.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectScheduledEventMatching
FixtureExecutionResult expectScheduledEventMatching(Instant scheduledTime, org.hamcrest.Matcher<? super EventMessage> matcher) Asserts that an event matching the givenmatcheris scheduled at the givenscheduledTime.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectScheduledEvent
Asserts that the givenapplicationEventis scheduled at the givenscheduledTime.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectScheduledEventOfType
Asserts that an event of the giveneventTypeis scheduled at the givenscheduledTime.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectNoScheduledEvents
FixtureExecutionResult expectNoScheduledEvents()Asserts that no events are scheduled.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectNoScheduledEventMatching
FixtureExecutionResult expectNoScheduledEventMatching(Duration durationToScheduledTime, org.hamcrest.Matcher<? super EventMessage> matcher) Asserts that no event matching the givenmatcheris scheduled after the given duration.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectNoScheduledEvent
Asserts that the giveneventis not scheduled after the given duration.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectNoScheduledEventOfType
FixtureExecutionResult expectNoScheduledEventOfType(Duration durationToScheduledTime, Class<?> eventType) Asserts that no event of the giveneventTypeis scheduled after the given duration.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectNoScheduledEventMatching
FixtureExecutionResult expectNoScheduledEventMatching(Instant scheduledTime, org.hamcrest.Matcher<? super EventMessage> matcher) Asserts that no event matching the givenmatcheris scheduled at the givenscheduledTime.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectNoScheduledEvent
Asserts that the giveneventis not scheduled at the givenscheduledTime.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectNoScheduledEventOfType
Asserts that no event of the giveneventTypeis scheduled at the givenscheduledTime.- Returns:
- the FixtureExecutionResult for method chaining
- Throws:
UnsupportedOperationException- always, asaxoniq-legacycarries no event scheduler
-
expectScheduledDeadlineMatching
FixtureExecutionResult expectScheduledDeadlineMatching(Duration duration, org.hamcrest.Matcher<? super DeadlineMessage> matcher) 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- Returns:
- the FixtureExecutionResult for method chaining
-
expectScheduledDeadline
Asserts that a deadline equal to the givendeadlinehas been scheduled after the givenduration. Note that the source attribute of the deadline is ignored when comparing deadlines. Deadlines are compared using an "equals" check on all fields in the deadlines.- Parameters:
duration- the time to wait before the deadline should be metdeadline- the expected deadline- Returns:
- the FixtureExecutionResult for method chaining
-
expectScheduledDeadlineOfType
Asserts that a deadline of the givendeadlineTypehas been scheduled after the givenduration.- Parameters:
duration- the time to wait before the deadline is metdeadlineType- the type of the expected deadline- Returns:
- the FixtureExecutionResult for method chaining
-
expectScheduledDeadlineWithName
Asserts that a deadline with the givendeadlineNamehas been scheduled after the givenduration.- Parameters:
duration- the time to wait before the deadline is metdeadlineName- the name of the expected deadline- Returns:
- the FixtureExecutionResult for method chaining
-
expectScheduledDeadlineMatching
FixtureExecutionResult expectScheduledDeadlineMatching(Instant scheduledTime, org.hamcrest.Matcher<? super DeadlineMessage> matcher) Asserts that a deadline matching the givenmatcherhas been scheduled at the givenscheduledTime. If thescheduledTimeis calculated based on the "current time", use theFixtureConfiguration.currentTime()to get the time to use as "current time".- Parameters:
scheduledTime- the time at which the deadline should be metmatcher- the matcher defining the deadline expected- Returns:
- the FixtureExecutionResult for method chaining
-
expectScheduledDeadline
Asserts that a deadline equal to the givendeadlinehas been scheduled at the givenscheduledTime. If thescheduledTimeis calculated based on the "current time", use theFixtureConfiguration.currentTime()to get the time to use as "current time". Note that the source attribute of the deadline is ignored when comparing deadlines. Deadlines are compared using an "equals" check on all fields in the deadlines.- Parameters:
scheduledTime- the time at which the deadline is scheduleddeadline- the expected deadline- Returns:
- the FixtureExecutionResult for method chaining
-
expectScheduledDeadlineOfType
Asserts that a deadline of the givendeadlineTypehas been scheduled at the givenscheduledTime.- Parameters:
scheduledTime- the time at which the deadline is scheduleddeadlineType- the type of the expected deadline- Returns:
- the FixtureExecutionResult for method chaining
-
expectScheduledDeadlineWithName
Asserts that a deadline with the givendeadlineNamehas been scheduled at the givenscheduledTime.- Parameters:
scheduledTime- the time at which the deadline is scheduleddeadlineName- the name of the expected deadline- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadlines
FixtureExecutionResult expectNoScheduledDeadlines()Asserts that no deadlines are scheduled. This means that either no deadlines were scheduled at all, all schedules have been cancelled or all scheduled deadlines have been met already.- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadlineMatching
FixtureExecutionResult expectNoScheduledDeadlineMatching(org.hamcrest.Matcher<? super DeadlineMessage> matcher) Asserts that no deadline matching the givenmatcheris scheduled. Can be used to validate if a deadline has never been set or has been canceled.- Parameters:
matcher- the matcher defining the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadlineMatching
FixtureExecutionResult expectNoScheduledDeadlineMatching(Duration durationToScheduledTime, org.hamcrest.Matcher<? super DeadlineMessage> matcher) Asserts that no deadline matching the givenmatchershould be scheduled after the givendurationToScheduledTime. Can be used to validate if a deadline has never been set or has been canceled at an exact moment in time.- Parameters:
durationToScheduledTime- the time to wait until the trigger point of the deadline which should not be scheduledmatcher- the matcher defining the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadline
Asserts that no deadline equal to the givendeadlinehas been scheduled after the givendurationToScheduledTime. Can be used to validate if a deadline has never been set or has been canceled at an exact moment in time. Note that the source attribute of the deadline is ignored when comparing deadlines. Deadlines are compared using an "equals" check on all fields in the deadlines.- Parameters:
durationToScheduledTime- the time to wait until the trigger point of the deadline which should not be scheduleddeadline- the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadlineOfType
FixtureExecutionResult expectNoScheduledDeadlineOfType(Duration durationToScheduledTime, Class<?> deadlineType) Asserts that no deadline of the givendeadlineTypehas been scheduled at the givendurationToScheduledTime. Can be used to validate if a deadline has never been set or has been canceled at an exact moment in time.- Parameters:
durationToScheduledTime- the time to wait until the trigger point of the deadline which should not be scheduleddeadlineType- the type of the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadlineWithName
FixtureExecutionResult expectNoScheduledDeadlineWithName(Duration durationToScheduledTime, String deadlineName) Asserts that no deadline with the givendeadlineNamehas been scheduled after the givendurationToScheduledTime. Can be used to validate if a deadline has never been set or has been canceled at an exact moment in time.- Parameters:
durationToScheduledTime- the time to wait until the trigger point of the deadline which should not be scheduleddeadlineName- the name of the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadlineMatching
FixtureExecutionResult expectNoScheduledDeadlineMatching(Instant scheduledTime, org.hamcrest.Matcher<? super DeadlineMessage> matcher) Asserts that no deadline matching the givenmatcherhas been scheduled at the givenscheduledTime. Can be used to validate if a deadline has never been set or has been canceled at an exact moment in time. If thescheduledTimeis calculated based on the "current time", use theFixtureConfiguration.currentTime()to get the time to use as "current time".- Parameters:
scheduledTime- the time at which no deadline matching the givenmatchershould be scheduledmatcher- the matcher defining the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadline
Asserts that no deadline equal to the givendeadlinehas been scheduled at the givenscheduledTime. Can be used to validate if a deadline has never been set or has been canceled at an exact moment in time. If thescheduledTimeis calculated based on the "current time", use theFixtureConfiguration.currentTime()to get the time to use as "current time". Note that the source attribute of the deadline is ignored when comparing deadlines. Deadlines are compared using an "equals" check on all fields in the deadlines.- Parameters:
scheduledTime- the time at which no deadline equal to the givendeadlineshould be scheduleddeadline- the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadlineOfType
FixtureExecutionResult expectNoScheduledDeadlineOfType(Instant scheduledTime, Class<?> deadlineType) Asserts that no deadline with the givendeadlineTypehas been scheduled at the givenscheduledTime. Can be used to validate if a deadline has never been set or has been canceled at an exact moment in time.- Parameters:
scheduledTime- the time at which no deadline ofdeadlineTypeshould be scheduleddeadlineType- the type of the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadlineWithName
FixtureExecutionResult expectNoScheduledDeadlineWithName(Instant scheduledTime, String deadlineName) Asserts that no deadline with the givendeadlineNamehas been scheduled at the givenscheduledTime. Can be used to validate if a deadline has never been set or has been canceled at an exact moment in time.- Parameters:
scheduledTime- the time at which no deadline ofdeadlineNameshould be scheduleddeadlineName- the name of the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadlineMatching
FixtureExecutionResult expectNoScheduledDeadlineMatching(Instant from, Instant to, org.hamcrest.Matcher<? super DeadlineMessage> matcher) Asserts that no deadline matching the givenmatcherhas been scheduled between thetoandfromtimes, wheretoandfromare inclusive. Can be used to validate if a deadline has never been set or has been canceled within a given timeframe.- Parameters:
from- the time from which no deadline equal to the givendeadlineshould be scheduled (inclusive)to- the time until which no deadline equal to the givendeadlineshould be scheduled (inclusive)matcher- the matcher defining the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadline
Asserts that no deadline equal to the givendeadlinehas been scheduled between thetoandfromtimes, wheretoandfromare inclusive. Can be used to validate if a deadline has never been set or has been canceled within a given timeframe.- Parameters:
from- the time from which no deadline equal to the givendeadlineshould be scheduled (inclusive)to- the time until which no deadline equal to the givendeadlineshould be scheduled (inclusive)deadline- the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadlineOfType
FixtureExecutionResult expectNoScheduledDeadlineOfType(Instant from, Instant to, Class<?> deadlineType) Asserts that no deadline with the givendeadlineTypehas been scheduled between thetoandfromtimes, wheretoandfromare inclusive. Can be used to validate if a deadline has never been set or has been canceled within a given timeframe.- Parameters:
from- the time from which no deadline equal to the givendeadlineshould be scheduled (inclusive)to- the time until which no deadline equal to the givendeadlineshould be scheduled (inclusive)deadlineType- the type of the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectNoScheduledDeadlineWithName
FixtureExecutionResult expectNoScheduledDeadlineWithName(Instant from, Instant to, String deadlineName) Asserts that no deadline with the givendeadlineNamehas been scheduled between thetoandfromtimes, wheretoandfromare inclusive. Can be used to validate if a deadline has never been set or has been canceled within a given timeframe.- Parameters:
from- the time from which no deadline equal to the givendeadlineshould be scheduled (inclusive)to- the time until which no deadline equal to the givendeadlineshould be scheduled (inclusive)deadlineName- the name of the deadline which should not be scheduled- Returns:
- the FixtureExecutionResult for method chaining
-
expectDeadlinesMetMatching
@Deprecated FixtureExecutionResult expectDeadlinesMetMatching(org.hamcrest.Matcher<? extends List<?>> matcher) Deprecated.in favor ofexpectTriggeredDeadlinesMatching(Matcher)Asserts that deadlines match givenmatcherhave been met (which have passed in time) on this saga.- Parameters:
matcher- the matcher that defines the expected list of deadlines- Returns:
- the FixtureExecutionResult for method chaining
-
expectTriggeredDeadlinesMatching
FixtureExecutionResult expectTriggeredDeadlinesMatching(org.hamcrest.Matcher<? extends List<?>> matcher) Asserts that deadlines matching the givenmatcherhave been triggered for this saga.The
matcheris matched against the list of triggeredDeadlineMessages. Axon Framework 4 typed it as a matcher of a list of a super type ofDeadlineMessage, which Axon Framework 5'sMatchers.payloadsMatching(Matcher)no longer satisfies, as it matches a list of a subtype ofMessage. The parameter therefore accepts a matcher of any list, so both compile.- Parameters:
matcher- the matcher that defines the expected list of deadlines- Returns:
- the current FixtureExecutionResult for method chaining
-
expectDeadlinesMet
Deprecated.in favor ofexpectTriggeredDeadlines(Object...)Asserts that givenexpecteddeadlines have been met (which have passed in time). Deadlines are compared comparing their type and fields using "equals".- Parameters:
expected- the sequence of deadlines expected to be met- Returns:
- the FixtureExecutionResult for method chaining
-
expectTriggeredDeadlines
Asserts that givenexpecteddeadlines have been triggered. Deadlines are compared comparing their type and fields using "equals".- Parameters:
expected- the sequence of deadlines expected to have been triggered- Returns:
- the current FixtureExecutionResult for method chaining
-
expectTriggeredDeadlinesWithName
Asserts that the givenexpectedDeadlineNameshave been triggered. Matches that the given names are complete, in the same order and match the triggered deadlines by validating withDeadlineMessage.getDeadlineName().- Parameters:
expectedDeadlineNames- the sequence of deadline names expected to have been triggered- Returns:
- the current FixtureExecutionResult for method chaining
-
expectTriggeredDeadlinesOfType
Asserts that the givenexpectedDeadlineTypeshave been triggered. Matches that the given types are complete, in the same order and match the triggered deadlines by validating with.invalid reference
DeadlineMessage#getPayloadType()- Parameters:
expectedDeadlineTypes- the sequence of deadline types expected to have been triggered- Returns:
- the current FixtureExecutionResult for method chaining
-
expectTriggeredDeadlines(Object...)