Module org.junit.jupiter.params
Class SimpleArgumentsAggregator
java.lang.Object
org.junit.jupiter.params.aggregator.SimpleArgumentsAggregator
- All Implemented Interfaces:
ArgumentsAggregator
@API(status=EXPERIMENTAL,
since="5.13")
public abstract class SimpleArgumentsAggregator
extends Object
implements ArgumentsAggregator
SimpleArgumentsAggregator
is an abstract base class for
ArgumentsAggregator
implementations that do not need to distinguish
between fields and method/constructor parameters.- Since:
- 5.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Object
aggregateArguments
(ArgumentsAccessor accessor, Class<?> targetType, AnnotatedElementContext context, int parameterIndex) aggregateArguments
(ArgumentsAccessor accessor, ParameterContext context) Aggregate the arguments contained in the suppliedaccessor
into a single object.aggregateArguments
(ArgumentsAccessor accessor, FieldContext context) Aggregate the arguments contained in the suppliedaccessor
into a single object.
-
Constructor Details
-
SimpleArgumentsAggregator
public SimpleArgumentsAggregator()
-
-
Method Details
-
aggregateArguments
public Object aggregateArguments(ArgumentsAccessor accessor, ParameterContext context) throws ArgumentsAggregationException Description copied from interface:ArgumentsAggregator
Aggregate the arguments contained in the suppliedaccessor
into a single object.- Specified by:
aggregateArguments
in interfaceArgumentsAggregator
- Parameters:
accessor
- anArgumentsAccessor
containing the arguments to be aggregated; nevernull
context
- the parameter context where the aggregated result is to be supplied; nevernull
- Returns:
- the aggregated result; may be
null
but only if the target type is a reference type - Throws:
ArgumentsAggregationException
- if an error occurs during the aggregation
-
aggregateArguments
public Object aggregateArguments(ArgumentsAccessor accessor, FieldContext context) throws ArgumentsAggregationException Description copied from interface:ArgumentsAggregator
Aggregate the arguments contained in the suppliedaccessor
into a single object.- Specified by:
aggregateArguments
in interfaceArgumentsAggregator
- Parameters:
accessor
- anArgumentsAccessor
containing the arguments to be aggregated; nevernull
context
- the field context where the aggregated result is to be injected; nevernull
- Returns:
- the aggregated result; may be
null
but only if the target type is a reference type - Throws:
ArgumentsAggregationException
- if an error occurs during the aggregation
-
aggregateArguments
protected abstract Object aggregateArguments(ArgumentsAccessor accessor, Class<?> targetType, AnnotatedElementContext context, int parameterIndex) throws ArgumentsAggregationException - Throws:
ArgumentsAggregationException
-