Annotation Interface AddConfigBlock


Add a configuration fragment to the synthetic test configuration.

Example:

  @AddConfigBlock(type = "yaml", value = """
      foo1:
        bar: "value1"
  """)
  @AddConfigBlock(type = "properties", value = """
       foo2=value2
       foo3=value3
  """)
  class MyTest {
  }
 

This annotation can be repeated.

If used on a method, the container will be reset regardless of the test lifecycle.

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Configuration fragment.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specifies the configuration format.
  • Element Details

    • type

      String type
      Specifies the configuration format. Possible values are: 'yaml' and `properties`.

      The default format is 'properties'

      Returns:
      the supported type
      Default:
      "properties"
    • value

      String value
      Configuration fragment.
      Returns:
      fragment