Package org.axonframework.test.extension
Annotation 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 thevalue()to an explicit provider implementation is forbidden as the annotated element already serves as the provider. - On a
@Testmethod directly, or on the test class itself (applying to all tests in that class). If used this way, thevalue()must be set to a concreteAxonTestFixtureProviderimplementation that the extension will use to instantiate the fixture, unless anAxonTestFixtureProvideris already declared via a field or method within the test class hierarchy.
- Author:
- Jan Galinski
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends AxonTestFixtureProvider> TheAxonTestFixtureProviderimplementation to use when this annotation is placed on a test class or test method.
-
Element Details
-
value
Class<? extends AxonTestFixtureProvider> valueTheAxonTestFixtureProviderimplementation to use when this annotation is placed on a test class or test method.Defaults to
AxonTestFixtureProvideritself, indicating that the provider should be discovered on a field or method.- Returns:
- the provider implementation class
- Default:
org.axonframework.test.extension.AxonTestFixtureProvider.class
-