Interface PublishedEvents

All Known Subinterfaces:
AssertablePublishedEvents
All Known Implementing Classes:
DefaultAssertablePublishedEvents, DefaultPublishedEvents

public interface PublishedEvents
All Spring application events fired during the test execution.
Author:
Oliver Drotbohm
  • Method Details

    • of

      static PublishedEvents of(Object... events)
      Creates a new PublishedEvents instance for the given events.
      Parameters:
      events - must not be null.
      Returns:
      will never be null.
    • of

      static PublishedEvents of(Collection<? extends Object> events)
      Creates a new PublishedEvents instance for the given events.
      Parameters:
      events - must not be null.
      Returns:
    • ofType

      Returns all application events of the given type that were fired during the test execution.
      Type Parameters:
      T - the event type
      Parameters:
      type - must not be null.
      Returns:
    • eventOfTypeWasPublished

      default boolean eventOfTypeWasPublished(Class<?> type)
      Returns whether an event of the given type was published.
      Parameters:
      type - must not be null.
      Returns:
      whether an event of the given type was published.