Annotation Interface ProvidedAxonTestFixture


@Target({METHOD,FIELD,TYPE}) @Retention(RUNTIME) public @interface ProvidedAxonTestFixture
Annotation to mark a field or method that provides the AxonTestFixture.

This annotation can be used in two ways:

  • On a field or method (can be static) of a test class. The type or return type must be an AxonTestFixtureProvider. In this case, setting the value() to an explicit provider implementation is forbidden as the annotated element already serves as the provider.
  • On a @Test method directly, or on the test class itself (applying to all tests in that class). If used this way, the value() must be set to a concrete AxonTestFixtureProvider implementation that the extension will use to instantiate the fixture, unless an AxonTestFixtureProvider is already declared via a field or method within the test class hierarchy.
Author:
Jan Galinski
  • Element Details

    • value

      Class<? extends AxonTestFixtureProvider> value
      The AxonTestFixtureProvider implementation to use when this annotation is placed on a test class or test method.

      Defaults to AxonTestFixtureProvider itself, indicating that the provider should be discovered on a field or method.

      Returns:
      the provider implementation class
      Default:
      org.axonframework.test.extension.AxonTestFixtureProvider.class