Class AggregationUtils
- java.lang.Object
-
- org.junit.jupiter.params.aggregator.AggregationUtils
-
@API(status=INTERNAL, since="5.2") public class AggregationUtils extends Object
Collection of utilities for working with aggregating argument consumers in parameterized tests (i.e., parameters of typeArgumentsAccessoror annotated with@AggregateWith).- Since:
- 5.2
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanhasAggregator(Method method)static booleanhasPotentiallyValidSignature(Method method)Determine if the suppliedMethodhas a potentially valid signature (i.e., formal parameter declarations) with regard to aggregators.static intindexOfFirstAggregator(Method method)static booleanisAggregator(Parameter parameter)Determine if the suppliedParameteris an aggregator (i.e., of typeArgumentsAccessoror annotated withAggregateWith).
-
-
-
Method Detail
-
hasPotentiallyValidSignature
public static boolean hasPotentiallyValidSignature(Method method)
Determine if the suppliedMethodhas a potentially valid signature (i.e., formal parameter declarations) with regard to aggregators.This method takes a best-effort approach at enforcing the following policy for parameterized test methods that accept aggregators as arguments.
- zero or more indexed arguments come first.
- zero or more aggregators come next.
- zero or more arguments supplied by other
ParameterResolverimplementations come last.
- Returns:
trueif the method has a potentially valid signature
-
isAggregator
public static boolean isAggregator(Parameter parameter)
Determine if the suppliedParameteris an aggregator (i.e., of typeArgumentsAccessoror annotated withAggregateWith).- Returns:
trueif the parameter is an aggregator
-
hasAggregator
public static boolean hasAggregator(Method method)
- Returns:
trueif the method has an aggregator
-
indexOfFirstAggregator
public static int indexOfFirstAggregator(Method method)
- Returns:
- the index of the first aggregator, or
-1if not found
-
-