Class AggregationUtils

    • Method Detail

      • hasPotentiallyValidSignature

        public static boolean hasPotentiallyValidSignature​(Method method)
        Determine if the supplied Method 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
      • isAggregator

        public static boolean isAggregator​(Parameter parameter)
        Determine if the supplied Parameter is an aggregator (i.e., of type ArgumentsAccessor or annotated with AggregateWith).
        Returns:
        true if the parameter is an aggregator
      • hasAggregator

        public static boolean hasAggregator​(Method method)
        Determine if the supplied Method declares at least one Parameter that is an aggregator.
        Returns:
        true if the method has an aggregator
      • indexOfFirstAggregator

        public static int indexOfFirstAggregator​(Method method)
        Find the index of the first aggregator Parameter in the supplied Method.
        Returns:
        the index of the first aggregator, or -1 if not found