public class CsvDataProvider extends CommonDataProvider implements DataInputProvider, DataOutputProvider
CommonDataProvider.ResultColumnNames
DataProvider.type
Modifier and Type | Field and Description |
---|---|
static char |
CSV_CHAR_ESCAPE |
static String |
CSV_CHAR_LINEEND |
static char |
CSV_CHAR_QUOTE |
static char |
CSV_CHAR_SEPARATOR |
static String |
CSV_SEPARATOR |
static String |
CSV_TYPE |
columns, dataInPath, dataOutPath, indexData, resultColumnName, scenarioName
Constructor and Description |
---|
CsvDataProvider() |
Modifier and Type | Method and Description |
---|---|
int |
getNbLines()
Gets the number of readable lines of current opened file.
|
void |
prepare(String scenario) |
String[] |
readLine(int line,
boolean readResult) |
String |
readValue(String column,
int line)
Reads a cell of opened input file.
|
protected void |
writeValue(String column,
int line,
String value)
Defines how to write values.
|
getIndexData, getModel, getNbGherkinExample, getResultColumnName, isResultColumnNameAuthorized, setDataInPath, setDataOutPath, setIndexData, writeDataResult, writeFailedResult, writeSuccessResult, writeWarningResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
writeDataResult, writeFailedResult, writeSuccessResult, writeWarningResult
getIndexData, getModel, getNbGherkinExample, getResultColumnName, isResultColumnNameAuthorized, setDataInPath, setDataOutPath, setIndexData
public static final String CSV_TYPE
public static final char CSV_CHAR_SEPARATOR
public static final char CSV_CHAR_QUOTE
public static final char CSV_CHAR_ESCAPE
public static final String CSV_CHAR_LINEEND
public static final String CSV_SEPARATOR
public void prepare(String scenario)
prepare
in interface DataProvider
public int getNbLines()
getNbLines
in interface DataInputProvider
public String readValue(String column, int line) throws TechnicalException
readValue
in interface DataInputProvider
column
- index of the column to readline
- index of the line to readTechnicalException
- if Wrong data file (IOException, EmptyDataFileContentException or WrongDataFileFormatException)public String[] readLine(int line, boolean readResult)
readLine
in interface DataInputProvider
line
- id of the line to read (line=0 for reading headers ; line=1 for reading 1st line, ...)readResult
- true if result must be returned, false otherwiseprotected void writeValue(String column, int line, String value)
writeValue
in class CommonDataProvider
column
- The column nameline
- The line numbervalue
- The value to writeCopyright © 2023 NoraUi. All rights reserved.