Annotation Type ParametersFactory
-
@Documented @Retention(RUNTIME) @Target(METHOD) public @interface ParametersFactoryUsed 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 toIterable<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
Nameto provide more descriptive parameter names for test descriptions.- See Also:
Name
-
-
Field Summary
Fields Modifier and Type Fields Description static java.lang.StringDEFAULT_FORMATTINGUse default argument formatting for test cases.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringargumentFormattingSpecify custom formatting for test names (constructor arguments).booleanshuffleShuffles the order of tests generated for the parameter set.
-
-
-
Element Detail
-
argumentFormatting
java.lang.String argumentFormatting
Specify 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$swould select only the second argument (indexes are zero-based).- Default:
- "default"
-
-