Package com.pholser.junit.quickcheck
Annotation Interface From
@Target({PARAMETER,FIELD,ANNOTATION_TYPE,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(Produced.class)
public @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 -
Optional Element Summary
Optional Elements
-
Element Details
-
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
-