Class ArgumentSets
java.lang.Object
org.junitpioneer.jupiter.cartesian.ArgumentSets
Class for defining sets to a
CartesianTest execution with arguments for each parameter
in the order in which they appear in the test method.
Use the static factory method argumentsForFirstParameter
to create an instance and call argumentsForNextParameter
for each parameter after the first. Alternatively, call the static factory method
create to create an instance call argumentsForNextParameter for each parameter.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ArgumentSetsadd(Collection<?> arguments) static <T> ArgumentSetsargumentsForFirstParameter(Collection<T> arguments) Creates a single set of distinct objects (according to theirequals) for the first parameter of aCartesianTestfrom the elements of the passedCollection.static <T> ArgumentSetsargumentsForFirstParameter(Stream<T> arguments) static <T> ArgumentSetsargumentsForFirstParameter(T... arguments) Creates a single set of distinct objects (according to theirequals) for the first parameter of aCartesianTestfrom the elements of the passed objects.final <T> ArgumentSetsargumentsForNextParameter(Collection<T> arguments) Creates a single set of distinct objects (according to theirequals) for the next parameter of aCartesianTestfrom the elements of the passedCollection.final <T> ArgumentSetsargumentsForNextParameter(Stream<T> arguments) final <T> ArgumentSetsargumentsForNextParameter(T... arguments) Creates a single set of distinct objects (according to theirequals) for the next parameter of aCartesianTestfrom the elements of the passed objects.static ArgumentSetscreate()Creates a newArgumentSetswithout arguments for any parameters.
-
Field Details
-
arguments
-
-
Constructor Details
-
ArgumentSets
private ArgumentSets() -
ArgumentSets
-
-
Method Details
-
add
-
create
Creates a newArgumentSetswithout arguments for any parameters. -
argumentsForFirstParameter
Creates a single set of distinct objects (according to theirequals) for the first parameter of aCartesianTestfrom the elements of the passedCollection.The passed argument does not have to be an instance of
Set.- Parameters:
arguments- the objects that should be passed to the parameter- Returns:
- a new
ArgumentSetsobject
-
argumentsForFirstParameter
Creates a single set of distinct objects (according to theirequals) for the first parameter of aCartesianTestfrom the elements of the passed objects.- Parameters:
arguments- the objects that should be passed to the parameter- Returns:
- a new
ArgumentSetsobject
-
argumentsForFirstParameter
Creates a single set of distinct objects (according to theirequals) for the first parameter of aCartesianTestfrom the elements of the passedStream.- Parameters:
arguments- the objects that should be passed to the parameter- Returns:
- a new
ArgumentSetsobject
-
argumentsForNextParameter
Creates a single set of distinct objects (according to theirequals) for the next parameter of aCartesianTestfrom the elements of the passedCollection.The passed argument does not have to be an instance of
Set.- Parameters:
arguments- the objects that should be passed to the parameter- Returns:
- this
ArgumentSetsobject, for fluent set definitions
-
argumentsForNextParameter
Creates a single set of distinct objects (according to theirequals) for the next parameter of aCartesianTestfrom the elements of the passed objects.- Parameters:
arguments- the objects that should be passed to the parameter- Returns:
- this
ArgumentSetsobject, for fluent set definitions
-
argumentsForNextParameter
Creates a single set of distinct objects (according to theirequals) for the next parameter of aCartesianTestfrom the elements of the passedStream.- Parameters:
arguments- the objects that should be passed to the parameter- Returns:
- this
ArgumentSetsobject, for fluent set definitions
-
getArguments
-