Package com.pholser.junit.quickcheck
Annotation Interface Property
Mark a method on a class that is run with the JUnitQuickcheck
runner with this annotation to have it run as a property-based test.
A method marked with this annotation should be an instance method
declared as public with a return type of void.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionintintintClass<? extends MinimalCounterexampleHook>booleanint
-
Element Details
-
mode
Mode mode- Returns:
- the verification mode for the property
- Default:
- SAMPLING
-
trials
int trials- Returns:
- how many sets of parameters to verify the property with, in
Mode.SAMPLINGmode; inMode.EXHAUSTIVEmode, how many values to generate for each property parameter
- Default:
- 100
-
shrink
boolean shrink- Returns:
- whether or not to attempt to shrink a failing set of parameters
- Default:
- true
-
maxShrinks
int maxShrinks- Returns:
- the maximum number of shrink attempts to make
on a failing set of parameters; in effect only when
shrink()istrue
- Default:
- 100
-
maxShrinkDepth
int maxShrinkDepth- Returns:
- the maximum depth of shrink tree to make on
a failing set of parameters; in effect only when
shrink()istrue
- Default:
- 20
-
maxShrinkTime
int maxShrinkTime- Returns:
- the maximum elapsed time for the shrinking process in
milliseconds; in effect only when
shrink()istrue
- Default:
- 60000
-
onMinimalCounterexample
Class<? extends MinimalCounterexampleHook> onMinimalCounterexample- Returns:
- callback that it is executed if a minimal counterexample is found (after shrinking)
- Default:
- com.pholser.junit.quickcheck.hook.NilMinimalCounterexampleHook.class
-