Annotation Interface TestResourcesProperties


@Retention(RUNTIME) @Target({ANNOTATION_TYPE,TYPE}) public @interface TestResourcesProperties
This annotation can be applied to tests annotated with @MicronautTest in order to require some properties to be resolved by Micronaut Test Resources before the application context is available.

It is conceptually similar to a TestPropertyProvider except that it allows accessing the test resources properties declaratively instead of having to use the test resources client directly.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The optional list of test resource property providers which can be applied to enhance the set of properties available to a test.
    Declares the list of properties which should be made available to the test before the application context is started.
  • Element Details

    • value

      String[] value
      Declares the list of properties which should be made available to the test before the application context is started. These properties will be queried by the test resources client and exposed as properties to the test.
      Returns:
      the list of properties
      Default:
      {}
    • providers

      Class<? extends TestResourcesPropertyProvider>[] providers
      The optional list of test resource property providers which can be applied to enhance the set of properties available to a test.
      Returns:
      the list of providers
      Default:
      {}