Class SimpleArgumentsAggregator
- java.lang.Object
-
- org.junit.jupiter.params.aggregator.SimpleArgumentsAggregator
-
- All Implemented Interfaces:
ArgumentsAggregator
@API(status=MAINTAINED, since="5.13.3") public abstract class SimpleArgumentsAggregator extends java.lang.Object implements ArgumentsAggregatorSimpleArgumentsAggregatoris an abstract base class forArgumentsAggregatorimplementations that do not need to distinguish between fields and method/constructor parameters.- Since:
- 5.0
- See Also:
ArgumentsAggregator
-
-
Constructor Summary
Constructors Constructor Description SimpleArgumentsAggregator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.ObjectaggregateArguments(ArgumentsAccessor accessor, java.lang.Class<?> targetType, org.junit.jupiter.api.extension.AnnotatedElementContext context, int parameterIndex)java.lang.ObjectaggregateArguments(ArgumentsAccessor accessor, org.junit.jupiter.api.extension.ParameterContext context)Aggregate the arguments contained in the suppliedaccessorinto a single object.java.lang.ObjectaggregateArguments(ArgumentsAccessor accessor, FieldContext context)Aggregate the arguments contained in the suppliedaccessorinto a single object.
-
-
-
Method Detail
-
aggregateArguments
public java.lang.Object aggregateArguments(ArgumentsAccessor accessor, org.junit.jupiter.api.extension.ParameterContext context) throws ArgumentsAggregationException
Description copied from interface:ArgumentsAggregatorAggregate the arguments contained in the suppliedaccessorinto a single object.- Specified by:
aggregateArgumentsin interfaceArgumentsAggregator- Parameters:
accessor- anArgumentsAccessorcontaining the arguments to be aggregated; nevernullcontext- the parameter context where the aggregated result is to be supplied; nevernull- Returns:
- the aggregated result; may be
nullbut only if the target type is a reference type - Throws:
ArgumentsAggregationException- if an error occurs during the aggregation
-
aggregateArguments
public java.lang.Object aggregateArguments(ArgumentsAccessor accessor, FieldContext context) throws ArgumentsAggregationException
Description copied from interface:ArgumentsAggregatorAggregate the arguments contained in the suppliedaccessorinto a single object.- Specified by:
aggregateArgumentsin interfaceArgumentsAggregator- Parameters:
accessor- anArgumentsAccessorcontaining the arguments to be aggregated; nevernullcontext- the field context where the aggregated result is to be injected; nevernull- Returns:
- the aggregated result; may be
nullbut only if the target type is a reference type - Throws:
ArgumentsAggregationException- if an error occurs during the aggregation
-
aggregateArguments
protected abstract java.lang.Object aggregateArguments(ArgumentsAccessor accessor, java.lang.Class<?> targetType, org.junit.jupiter.api.extension.AnnotatedElementContext context, int parameterIndex) throws ArgumentsAggregationException
- Throws:
ArgumentsAggregationException
-
-