Annotation Interface From


Mark a parameter of a Property method with this annotation to have random values supplied to it via the specified Generator.

You may specify as many of these annotations as as you wish on a given parameter. On a given generation, one of the specified generators will be chosen at random with probability in proportion to frequency().

If any such generator produces values of a type incompatible with the type of the marked parameter, IllegalArgumentException is raised.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends Generator>
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
     
  • Element Details

    • value

      Class<? extends Generator> value
      Returns:
      the generator to be used for the annotated property parameter
    • frequency

      int frequency
      Returns:
      a weight to influence how often the generator is chosen
      Default:
      1