public class CSVTestDataSource extends Object implements TestDataSource
Constructor and Description |
---|
CSVTestDataSource(List<String> paths,
char separatorValue) |
CSVTestDataSource(List<String> paths,
char separatorValue,
char quotechar,
char escape,
int skipLines) |
CSVTestDataSource(String path) |
CSVTestDataSource(String path,
char separatorValue) |
CSVTestDataSource(String path,
char separatorValue,
char quotechar,
char escape) |
Modifier and Type | Method and Description |
---|---|
protected <T> boolean |
assignPropertyValue(T newObject,
String property,
String value) |
protected <T> T |
createNewInstanceOf(Class<T> clazz,
Object... constructorArgs) |
protected List<String[]> |
getCSVDataFrom(Reader testDataReader) |
List<Map<String,String>> |
getData() |
<T> List<T> |
getDataAsInstancesOf(Class<T> clazz,
Object... constructorArgs)
Returns the test data as a list of JavaBean instances.
|
List<String> |
getHeaders() |
<T> List<T> |
getInstanciatedInstancesFrom(Class<T> clazz,
StepFactory factory) |
protected List<Map<String,String>> |
loadTestDataFrom(List<String[]> rows) |
TestDataSource |
separatedBy(char newSeparator) |
static boolean |
validTestDataPath(String path) |
public CSVTestDataSource(List<String> paths, char separatorValue, char quotechar, char escape, int skipLines) throws IOException
IOException
public CSVTestDataSource(String path) throws IOException
IOException
public CSVTestDataSource(List<String> paths, char separatorValue) throws IOException
IOException
public CSVTestDataSource(String path, char separatorValue) throws IOException
IOException
public CSVTestDataSource(String path, char separatorValue, char quotechar, char escape) throws IOException
IOException
public static boolean validTestDataPath(String path)
protected List<String[]> getCSVDataFrom(Reader testDataReader) throws IOException
IOException
protected List<Map<String,String>> loadTestDataFrom(List<String[]> rows) throws IOException
IOException
public List<String> getHeaders()
getHeaders
in interface TestDataSource
public <T> List<T> getDataAsInstancesOf(Class<T> clazz, Object... constructorArgs)
getDataAsInstancesOf
in interface TestDataSource
public <T> List<T> getInstanciatedInstancesFrom(Class<T> clazz, StepFactory factory)
getInstanciatedInstancesFrom
in interface TestDataSource
public TestDataSource separatedBy(char newSeparator)
separatedBy
in interface TestDataSource
Copyright © 2021. All rights reserved.