Top Constructors Methods
org.junit.jupiter.params.provider

pack-priv Class CsvArgumentsProvider

extends AnnotationBasedArgumentsProvider<CsvSource>
Class Inheritance
Imports
java.lang.annotation.Annotation, java.util.ArrayList, .List, java.util.stream.Stream, de.siegmar.fastcsv.reader.CsvRecord, .NamedCsvRecord, org.jspecify.annotations.Nullable, org.junit.jupiter.api.Named, org.junit.jupiter.api.extension.ExtensionContext, org.junit.jupiter.params.support.ParameterDeclarations, .ParameterNameAndArgument, org.junit.platform.commons.PreconditionViolationException, org.junit.platform.commons.util.Preconditions, .UnrecoverableExceptions

Since
5.0

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static String
getData(CsvSource csvSource)

private static List<String>
pack-priv static RuntimeException

Returns:

this method always throws an exception and therefore never returns anything; the return type is merely present to allow this method to be supplied as the operand in a throw statement
handleCsvException
(Throwable throwable, Annotation annotation)

pack-priv static Arguments
processCsvRecord(CsvRecord record, boolean useHeadersInDisplayName)

Processes custom null values, supports wrapping of column values in Named if necessary (for CSV header support), and returns the CSV record wrapped in an Arguments instance.

protected Stream<? extends Arguments>
provideArguments(ParameterDeclarations parameters, ExtensionContext context, CsvSource csvSource)

Overrides org.junit.jupiter.params.provider.AnnotationBasedArgumentsProvider.provideArguments.

The returned Stream will be properly closed by the default implementation of provideArguments(ParameterDeclarations, ExtensionContext), making it safe to use a resource such as Files.lines().

private static @Nullable String
Inherited from org.junit.jupiter.params.provider.AnnotationBasedArgumentsProvider:
acceptprovideArgumentsprovideArguments

Constructor Detail

CsvArgumentsProviderback to summary
pack-priv CsvArgumentsProvider()

Method Detail

getDataback to summary
private static String getData(CsvSource csvSource)
getHeadersback to summary
private static List<String> getHeaders(CsvRecord record)
handleCsvExceptionback to summary
pack-priv static RuntimeException handleCsvException(Throwable throwable, Annotation annotation)
Returns:RuntimeException

this method always throws an exception and therefore never returns anything; the return type is merely present to allow this method to be supplied as the operand in a throw statement

processCsvRecordback to summary
pack-priv static Arguments processCsvRecord(CsvRecord record, boolean useHeadersInDisplayName)

Processes custom null values, supports wrapping of column values in Named if necessary (for CSV header support), and returns the CSV record wrapped in an Arguments instance.

provideArgumentsback to summary
protected Stream<? extends Arguments> provideArguments(ParameterDeclarations parameters, ExtensionContext context, CsvSource csvSource)

Overrides org.junit.jupiter.params.provider.AnnotationBasedArgumentsProvider.provideArguments.

Doc from org.junit.jupiter.params.provider.AnnotationBasedArgumentsProvider.provideArguments.

The returned Stream will be properly closed by the default implementation of provideArguments(ParameterDeclarations, ExtensionContext), making it safe to use a resource such as Files.lines().

Annotations
@Override
resolveNullMarkerback to summary
private static @Nullable String resolveNullMarker(String record)
Annotations
@SuppressWarnings:ReferenceEquality, StringEquality