Class CSVTestDataSource
java.lang.Object
net.thucydides.core.steps.stepdata.CSVTestDataSource
- All Implemented Interfaces:
TestDataSource
Test data from a CSV file.
-
Constructor Summary
ConstructorsConstructorDescriptionCSVTestDataSource(String path) CSVTestDataSource(String path, char separatorValue) CSVTestDataSource(String path, char separatorValue, char quotechar, char escape) CSVTestDataSource(List<String> paths, char separatorValue) CSVTestDataSource(List<String> paths, char separatorValue, char quotechar, char escape, int skipLines) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> booleanassignPropertyValue(T newObject, String property, String value) protected <T> TcreateNewInstanceOf(Class<T> clazz, Object... constructorArgs) getCSVDataFrom(Reader testDataReader) getData()<T> List<T>getDataAsInstancesOf(Class<T> clazz, Object... constructorArgs) Returns the test data as a list of JavaBean instances.<T> List<T>getInstanciatedInstancesFrom(Class<T> clazz, StepFactory factory) loadTestDataFrom(List<String[]> rows) separatedBy(char newSeparator) static booleanvalidTestDataPath(String path)
-
Constructor Details
-
CSVTestDataSource
public CSVTestDataSource(List<String> paths, char separatorValue, char quotechar, char escape, int skipLines) throws IOException - Throws:
IOException
-
CSVTestDataSource
- Throws:
IOException
-
CSVTestDataSource
- Throws:
IOException
-
CSVTestDataSource
- Throws:
IOException
-
CSVTestDataSource
public CSVTestDataSource(String path, char separatorValue, char quotechar, char escape) throws IOException - Throws:
IOException
-
-
Method Details
-
validTestDataPath
-
getCSVDataFrom
- Throws:
IOException
-
loadTestDataFrom
- Throws:
IOException
-
getData
- Specified by:
getDatain interfaceTestDataSource
-
getHeaders
- Specified by:
getHeadersin interfaceTestDataSource
-
getDataAsInstancesOf
Returns the test data as a list of JavaBean instances.- Specified by:
getDataAsInstancesOfin interfaceTestDataSource
-
getInstanciatedInstancesFrom
- Specified by:
getInstanciatedInstancesFromin interfaceTestDataSource
-
separatedBy
- Specified by:
separatedByin interfaceTestDataSource
-
createNewInstanceOf
-
assignPropertyValue
-