Interface Arguments
-
@API(status=EXPERIMENTAL, since="5.0") public interface Arguments
Arguments
is an abstraction that provides access to an array of objects to be used for invoking a@ParameterizedTest
method.A
Stream
of suchArguments
will typically be provided by anArgumentsProvider
.- Since:
- 5.0
- See Also:
ParameterizedTest
,ArgumentsSource
,ArgumentsProvider
,ArgumentConverter
- API Note:
This interface is specifically designed as a simple holder of arguments of a parameterized test. Therefore, if you end up transforming or filtering the arguments, you should consider using one of the following in intermediate steps:
- The standard collections
- Tuples from third-party libraries, e.g., Commons Lang, or javatuples
- Your own data class
Alternatively, you can use an
ArgumentConverter
to convert some of the arguments from one type to another.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Object[]
get()
Get the arguments used for an invocation of the@ParameterizedTest
method.static Arguments
of(Object... arguments)
Factory method for creating an instance ofArguments
based on the suppliedarguments
.
-
-
-
Method Detail
-
get
Object[] get()
Get the arguments used for an invocation of the@ParameterizedTest
method.- Returns:
- the arguments; must not be
null
- API Note:
- If you need a type-safe way to access some or all of the arguments, please read the class-level API note.
-
-