Class CsvArgumentsProvider

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private com.univocity.parsers.csv.CsvParser csvParser  
      private static java.lang.String LINE_SEPARATOR  
      private java.util.Set<java.lang.String> nullValues  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.lang.String[] getHeaders​(com.univocity.parsers.csv.CsvParser csvParser)  
      (package private) static java.lang.RuntimeException handleCsvException​(java.lang.Throwable throwable, java.lang.annotation.Annotation annotation)  
      private java.util.stream.Stream<Arguments> parseTextBlock​(CsvSource csvSource)  
      private java.util.stream.Stream<Arguments> parseValueArray​(CsvSource csvSource)  
      (package private) static Arguments processCsvRecord​(java.lang.Object[] csvRecord, java.util.Set<java.lang.String> nullValues, boolean useHeadersInDisplayName, java.lang.String[] headers)
      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 java.util.stream.Stream<? extends Arguments> provideArguments​(ExtensionContext context, CsvSource csvSource)
      Provide a Stream of Arguments — based on metadata in the provided annotation — to be passed to a @ParameterizedTest method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Consumer

        andThen
    • Field Detail

      • nullValues

        private java.util.Set<java.lang.String> nullValues
      • csvParser

        private com.univocity.parsers.csv.CsvParser csvParser
    • Constructor Detail

      • CsvArgumentsProvider

        CsvArgumentsProvider()
    • Method Detail

      • parseTextBlock

        private java.util.stream.Stream<Arguments> parseTextBlock​(CsvSource csvSource)
      • parseValueArray

        private java.util.stream.Stream<Arguments> parseValueArray​(CsvSource csvSource)
      • getHeaders

        static java.lang.String[] getHeaders​(com.univocity.parsers.csv.CsvParser csvParser)
      • processCsvRecord

        static Arguments processCsvRecord​(java.lang.Object[] csvRecord,
                                          java.util.Set<java.lang.String> nullValues,
                                          boolean useHeadersInDisplayName,
                                          java.lang.String[] headers)
        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.
      • handleCsvException

        static java.lang.RuntimeException handleCsvException​(java.lang.Throwable throwable,
                                                             java.lang.annotation.Annotation annotation)
        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