Package io.github.artsok.internal
Class ParameterizedRepeatedMethodContext
- java.lang.Object
-
- io.github.artsok.internal.ParameterizedRepeatedMethodContext
-
public class ParameterizedRepeatedMethodContext extends Object
Encapsulates access to the parameters of a parameterized test method and caches the converters and aggregators used to resolve them.- Since:
- 5.3 - FULL COPY PAST FROM ORIGINAL JUNIT 5
-
-
Constructor Summary
Constructors Constructor Description ParameterizedRepeatedMethodContext(Method testMethod)
-
Method Summary
Modifier and Type Method Description intgetParameterCount()Get the number of parameters of theMethodrepresented by this context.booleanhasAggregator()booleanhasPotentiallyValidSignature()Determine if theMethodrepresented by this context has a potentially valid signature (i.e., formal parameter declarations) with regard to aggregators.
-
-
-
Constructor Detail
-
ParameterizedRepeatedMethodContext
public ParameterizedRepeatedMethodContext(Method testMethod)
-
-
Method Detail
-
hasPotentiallyValidSignature
public boolean hasPotentiallyValidSignature()
Determine if theMethodrepresented by this context has 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
-
getParameterCount
public int getParameterCount()
Get the number of parameters of theMethodrepresented by this context.- Returns:
- - number of parameters
-
-