net.thucydides.core.csv
Class CSVTestDataSource

Package class diagram package CSVTestDataSource
java.lang.Object
  extended by net.thucydides.core.csv.CSVTestDataSource
All Implemented Interfaces:
TestDataSource

public class CSVTestDataSource
extends Object
implements TestDataSource

Test data from a CSV file.


Constructor Summary
CSVTestDataSource(String path)
           
CSVTestDataSource(String path, char separatorValue)
           
 
Method Summary
protected
<T> boolean
assignPropertyValue(T newObject, String property, String value)
           
protected
<T> T
createNewInstanceOf(Class<T> clazz, Object... constructorArgs)
           
 List<Map<String,String>> getData()
           
<T> List<T>
getDataAsInstancesOf(Class<T> clazz, Object... constructorArgs)
          Returns the test data as a list of JavaBean instances.
<T extends ScenarioSteps>
List<T>
getInstanciatedInstancesFrom(Class<T> clazz, StepFactory factory)
           
protected  List<Map<String,String>> loadTestDataFrom(Reader testDataReader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVTestDataSource

public CSVTestDataSource(String path,
                         char separatorValue)
                  throws IOException
Throws:
IOException

CSVTestDataSource

public CSVTestDataSource(String path)
                  throws IOException
Throws:
IOException
Method Detail

loadTestDataFrom

protected List<Map<String,String>> loadTestDataFrom(Reader testDataReader)
                                             throws IOException
Throws:
IOException

getData

public List<Map<String,String>> getData()
Specified by:
getData 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 extends ScenarioSteps> 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-2012 Wakaleo Consulting. All Rights Reserved.