net.thucydides.core.csv
Class CSVTestDataSource
java.lang.Object
net.thucydides.core.csv.CSVTestDataSource
- All Implemented Interfaces:
- TestDataSource
public class CSVTestDataSource
- extends Object
- implements TestDataSource
Test data from a CSV file.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSVTestDataSource
public CSVTestDataSource(String path,
char separatorValue)
throws IOException
- Throws:
IOException
CSVTestDataSource
public CSVTestDataSource(String path)
throws IOException
- Throws:
IOException
validTestDataPath
public static boolean validTestDataPath(String path)
getCSVDataFrom
protected List<String[]> getCSVDataFrom(Reader testDataReader)
throws IOException
- Throws:
IOException
loadTestDataFrom
protected List<Map<String,String>> loadTestDataFrom(List<String[]> rows)
throws IOException
- Throws:
IOException
getData
public List<Map<String,String>> getData()
- Specified by:
getData in interface TestDataSource
getHeaders
public List<String> getHeaders()
- Specified by:
getHeaders in interface TestDataSource
getDataAsInstancesOf
public <T> List<T> getDataAsInstancesOf(Class<T> clazz,
Object... constructorArgs)
- Returns the test data as a list of JavaBean instances.
- Specified by:
getDataAsInstancesOf in interface TestDataSource
getInstanciatedInstancesFrom
public <T> List<T> getInstanciatedInstancesFrom(Class<T> clazz,
StepFactory factory)
- Specified by:
getInstanciatedInstancesFrom in interface TestDataSource
createNewInstanceOf
protected <T> T createNewInstanceOf(Class<T> clazz,
Object... constructorArgs)
assignPropertyValue
protected <T> boolean assignPropertyValue(T newObject,
String property,
String value)
Copyright © 2011-2013 Wakaleo Consulting. All Rights Reserved.