Class EventSchedulerValidator

java.lang.Object
org.axonframework.test.eventscheduler.EventSchedulerValidator

public class EventSchedulerValidator extends Object
Helper class for validating events scheduled in a given event scheduler.
Since:
1.1
Author:
Allard Buijze
  • Constructor Details

    • EventSchedulerValidator

      public EventSchedulerValidator(StubEventScheduler eventScheduler)
      Initializes the validator to validate the state of the given eventScheduler.
      Parameters:
      eventScheduler - The event scheduler to monitor
  • Method Details

    • assertScheduledEventMatching

      public void assertScheduledEventMatching(Duration duration, org.hamcrest.Matcher<?> matcher)
      Asserts that an event matching the given matcher is scheduled for publication after the given duration.
      Parameters:
      duration - The delay expected before the event is published
      matcher - The matcher that must match with the event scheduled at the given time
    • assertScheduledEventMatching

      public void assertScheduledEventMatching(Instant scheduledTime, org.hamcrest.Matcher<?> matcher)
      Asserts that an event matching the given matcher is scheduled for publication at the given scheduledTime.
      Parameters:
      scheduledTime - the time at which the event should be published
      matcher - The matcher that must match with the event scheduled at the given time
    • assertNoScheduledEventMatching

      public void assertNoScheduledEventMatching(Duration duration, org.hamcrest.Matcher<?> matcher)
      Asserts that no event matching the given matcher has been scheduled after the given duration.
      Parameters:
      duration - the delay within which no event matching the given matcher is expected
      matcher - the matcher defining the event which should not be scheduled after the given duration
    • assertNoScheduledEventMatching

      public void assertNoScheduledEventMatching(Instant scheduledTime, org.hamcrest.Matcher<?> matcher)
      Asserts that no event matching the given matcher has been scheduled at the given scheduledTime.
      Parameters:
      scheduledTime - the time at which no event matching the given matcher is expected
      matcher - the matcher defining the event which should not be scheduled at the given scheduledTime
    • assertNoScheduledEvents

      public void assertNoScheduledEvents()
      Asserts that no events are scheduled for publication.