Interface Arguments
-
- All Known Implementing Classes:
Arguments.ArgumentSet
@API(status=STABLE, since="5.7") public interface ArgumentsArgumentsis an abstraction that provides access to an array of objects to be used for invoking a@ParameterizedTestmethod.A
Streamof suchArgumentswill typically be provided by anArgumentsProvider.- Since:
- 5.0
- See Also:
Arguments.ArgumentSet,ParameterizedTest,ArgumentsSource,ArgumentsProvider,ArgumentConverter
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classArguments.ArgumentSet
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Argumentsarguments(java.lang.Object... arguments)Factory method for creating an instance ofArgumentsbased on the suppliedarguments.static Arguments.ArgumentSetargumentSet(java.lang.String name, java.lang.Object... arguments)java.lang.Object[]get()Get the arguments used for an invocation of the@ParameterizedTestmethod.static Argumentsof(java.lang.Object... arguments)Factory method for creating an instance ofArgumentsbased on the suppliedarguments.
-
-
-
Method Detail
-
get
java.lang.Object[] get()
Get the arguments used for an invocation of the@ParameterizedTestmethod.- Returns:
- the arguments; never
null
-
of
static Arguments of(java.lang.Object... arguments)
Factory method for creating an instance ofArgumentsbased on the suppliedarguments.- Parameters:
arguments- the arguments to be used for an invocation of the test method; must not benull- Returns:
- an instance of
Arguments; nevernull - See Also:
arguments(Object...),argumentSet(String, Object...)
-
arguments
static Arguments arguments(java.lang.Object... arguments)
Factory method for creating an instance ofArgumentsbased on the suppliedarguments.This method is an alias for
of(java.lang.Object...)and is intended to be used when statically imported — for example, via:import static org.junit.jupiter.params.provider.Arguments.arguments;- Parameters:
arguments- the arguments to be used for an invocation of the test method; must not benull- Returns:
- an instance of
Arguments; nevernull - Since:
- 5.3
- See Also:
argumentSet(String, Object...)
-
argumentSet
@API(status=MAINTAINED, since="5.13.3") static Arguments.ArgumentSet argumentSet(java.lang.String name, java.lang.Object... arguments)Factory method for creating anArguments.ArgumentSetbased on the suppliednameandarguments.Favor this method over
Arguments.of(...)andarguments(...)when you wish to assign a name to the entire set of arguments.This method is well suited to be used as a static import — for example, via:
import static org.junit.jupiter.params.provider.Arguments.argumentSet;.- Parameters:
name- the name of the argument set; must not benullor blankarguments- the arguments to be used for an invocation of the test method; must not benull- Returns:
- an
ArgumentSet; nevernull - Since:
- 5.11
- See Also:
Arguments.ArgumentSet,ParameterizedTest.ARGUMENT_SET_NAME_PLACEHOLDER,ParameterizedTest.ARGUMENT_SET_NAME_OR_ARGUMENTS_WITH_NAMES_PLACEHOLDER
-
-