org.axonframework.test.saga
Class EventSchedulerValidator

java.lang.Object
  extended by org.axonframework.test.saga.EventSchedulerValidator

public class EventSchedulerValidator
extends Object

Helper class for validating evets scheduled in a given event scheduler.

Since:
1.1
Author:
Allard Buijze

Constructor Summary
EventSchedulerValidator(StubEventScheduler eventScheduler)
          Initializes the validator to validate the state of the given eventScheduler.
 
Method Summary
 void assertNoScheduledEvents()
          Asserts that no events are scheduled for publication.
 void assertScheduledEventMatching(org.joda.time.DateTime scheduledTime, org.hamcrest.Matcher<?> matcher)
          Asserts that an event matching the given matcher is scheduled for publication at the given scheduledTime.
 void assertScheduledEventMatching(org.joda.time.Duration duration, org.hamcrest.Matcher<?> matcher)
          Asserts that an event matching the given matcher is scheduled for publication after the given duration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventSchedulerValidator

public EventSchedulerValidator(StubEventScheduler eventScheduler)
Initializes the validator to validate the state of the given eventScheduler.

Parameters:
eventScheduler - The event scheduler to monitor
Method Detail

assertScheduledEventMatching

public void assertScheduledEventMatching(org.joda.time.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(org.joda.time.DateTime 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

assertNoScheduledEvents

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



Copyright © 2010-2016. All Rights Reserved.