Annotation Interface Only
Mark a parameter of a Property method with this annotation to
limit the set of values of that parameter used to test the property.
In sampling mode, on each trial junit-quickcheck chooses a value from the limited set at random with equal probability.
In exhaustive mode, junit-quickcheck will use the values in the limited set for the property parameter, and no others.
Note: When a parameter is marked with this annotation, junit-quickcheck doesn't call upon any generators. Thus, it ignores any generator configuration annotations present on the parameter.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends StringConversion>How to convert the values invalue()into instances of the property parameter's type.
-
Element Details
-
value
String[] value- Returns:
- the values to which the property parameter should be limited
-
-
-
by
Class<? extends StringConversion> byHow to convert the values in
value()into instances of the property parameter's type.If not specified, junit-quickcheck employs the following strategies for value conversion for the marked parameter:
- If present, use a
public staticmethod on the property parameter type calledvalueOfwhich accepts a singleStringargument and whose return type is the type itself. - Otherwise, if present, use a
publicconstructor on the property parameter type which accepts a singleStringargument.
- Returns:
- a type for a value conversion strategy
- Default:
- com.pholser.junit.quickcheck.conversion.StringConversion.class
- If present, use a
-