Annotation Interface ForEachTest


@Target(TYPE) @Retention(RUNTIME) public @interface ForEachTest
Apply this annotation to a class in order to add a common configuration to all child tests.
This is primarily useful for method-based tests.
Note: the common configuration goes only one level deep.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns the groups in which child tests will be, by default.
    Returns a prefix to apply to the child tests.
    Class<? extends TestListener>[]
    Returns the listeners to add to all child tests.
    net.neoforged.api.distmarker.Dist[]
    Returns the sides the child tests are loaded on.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ForEachTest
     
  • Field Details

  • Element Details

    • idPrefix

      String idPrefix
      Returns a prefix to apply to the child tests.
      Returns:
      a prefix to apply to the child tests
      Default:
      ""
    • groups

      String[] groups
      Returns the groups in which child tests will be, by default.
      Returns:
      the groups in which child tests will be, by default
      Default:
      {}
    • listeners

      Class<? extends TestListener>[] listeners
      Returns the listeners to add to all child tests.
      Returns:
      the listeners to add to all child tests
      Default:
      {}
    • side

      net.neoforged.api.distmarker.Dist[] side
      Returns the sides the child tests are loaded on.
      Returns:
      the sides the child tests are loaded on
      Default:
      {}