Annotation Type ParametersFactory
Used to annotate methods providing parameters for parameterized tests. The method
annotated as the factory must be static, public, parameterless and must have a return
type assignable to
Iterable
<Object[]>
.
The iterable must return arrays conforming to the suite class's constructor with respect to the number and types of parameters.
The constructor's parameters can be annotated with Name
to provide
more descriptive parameter names for test descriptions.
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSpecify custom formatting for test names (constructor arguments).boolean
Shuffles the order of tests generated for the parameter set. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Use default argument formatting for test cases.
-
Field Details
-
DEFAULT_FORMATTING
Use default argument formatting for test cases.- See Also:
-
-
Element Details
-
argumentFormatting
String argumentFormattingSpecify custom formatting for test names (constructor arguments). The string must be a valid argument to Java's built-inFormatter
. Constructor arguments are available in the order they were returned fromParametersFactory
. Not all arguments have to be used, for example:foo=%1$s
would select only the second argument (indexes are zero-based).- Default:
"default"
-
shuffle
boolean shuffleShuffles the order of tests generated for the parameter set.- Default:
true
-