Class 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 Detail

      • ParameterizedRepeatedMethodContext

        public ParameterizedRepeatedMethodContext​(Method testMethod)
    • Method Detail

      • hasPotentiallyValidSignature

        public boolean hasPotentiallyValidSignature()
        Determine if the Method represented 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.

        1. zero or more indexed arguments come first.
        2. zero or more aggregators come next.
        3. zero or more arguments supplied by other ParameterResolver implementations come last.
        Returns:
        true if the method has a potentially valid signature
      • getParameterCount

        public int getParameterCount()
        Get the number of parameters of the Method represented by this context.
        Returns:
        - number of parameters
      • hasAggregator

        public boolean hasAggregator()
        Determine if the Method represented by this context declares at least one Parameter that is an aggregator.
        Returns:
        true if the method has an aggregator