Class AggregateTestUtils

java.lang.Object
org.springframework.modulith.test.AggregateTestUtils

public class AggregateTestUtils extends Object
Test utilities to work with aggregates.
Author:
Oliver Drotbohm
  • Constructor Details

    • AggregateTestUtils

      public AggregateTestUtils()
  • Method Details

    • eventsOf

      public static PublishedEvents eventsOf(Object aggregate)
      Extracts all domain events from the given aggregate that uses Spring Data's DomainEvents annotation to expose them.
      Parameters:
      aggregate - must not be null.
      Returns:
      PublishedEvents for all events contained in the given aggregate, will never be null.