Class StringVargsAggregator
java.lang.Object
fr.ght1pc9kc.testy.params.aggregators.StringVargsAggregator
- All Implemented Interfaces:
org.junit.jupiter.params.aggregator.ArgumentsAggregator
public class StringVargsAggregator
extends Object
implements org.junit.jupiter.params.aggregator.ArgumentsAggregator
Allow to aggregate String Var Args in junit parameterized Test
@ParameterizedTest @CsvSource({ "1, one, two, three" }) void should_use_string_aggregator(int index, @AggregateWith(StringVargsAggregator.class) String... aggregated) { assertThat(index).isEqualTo(1); assertThat(aggregated).containsExactly("one", "two", "three"); }
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaggregateArguments
(org.junit.jupiter.params.aggregator.ArgumentsAccessor accessor, org.junit.jupiter.api.extension.ParameterContext context)
-
Constructor Details
-
StringVargsAggregator
public StringVargsAggregator()
-
-
Method Details
-
aggregateArguments
public Object aggregateArguments(org.junit.jupiter.params.aggregator.ArgumentsAccessor accessor, org.junit.jupiter.api.extension.ParameterContext context) throws org.junit.jupiter.params.aggregator.ArgumentsAggregationException - Specified by:
aggregateArguments
in interfaceorg.junit.jupiter.params.aggregator.ArgumentsAggregator
- Throws:
org.junit.jupiter.params.aggregator.ArgumentsAggregationException
-