Annotation Interface When


@Target(PARAMETER) @Retention(RUNTIME) public @interface When
Mark a parameter of a Property method with this annotation to specify metadata about values generated for that parameter.
  • Element Details

    • discardRatio

      int discardRatio
      Returns:
      the ratio of discarded generated values to successful generated values above which values for the annotated property parameter will no longer be generated. For a non-positive value, an IllegalArgumentException is raised. The default value is 10, to curtail generation for satisfies() expressions that are difficult to satisfy or can never be satisfied (inadvertently or otherwise).
      Default:
      10
    • satisfies

      String satisfies
      Returns:
      an OGNL expression used to constrain the values fed to the annotated property parameter. The expression should evaluate to a boolean value. Within the expression, "_" refers to the property parameter.
      Default:
      ""
    • seed

      long seed
      Returns:
      a value to be used as the initial seed for the random value generator. Not specifying a value causes the seed to be chosen randomly.
      Default:
      0L