in gepard-core/src/main/java/com/epam/gepard/datadriven/feeders/SingleRowSelectorDataFeeder.java [58:84]
public DataDrivenParameterArray calculateParameterArray(final String className, final DataDrivenParameterArray inputParameterArray) {
DataDrivenParameterArray myArray = new DataDrivenParameterArray();
//need to have input array
if (inputParameterArray == null) {
String error = "PARAMETER ERROR: During the load of: " + className + " no input received to SingleRowSelectorDataFeeder class."
+ "\nCheck both testlist.txt and class.txt/csv file, Now exiting...";
DataFeederLoader.reportError(error);
myArray = null; //we should not continue as it is a wrong chain
}
//the new parameter array is one of the rows of the existing array
if ((myArray != null) && (selectedRow > inputParameterArray.size())) {
//ups, cannot select this row
String error = "PARAMETER ERROR: During the load of: " + className + " cannot select the requested row." + "\nRequested: " + selectedRow
+ ", available: " + inputParameterArray.size() + "\nCheck both testlist.txt and class.txt/csv file, Now exiting...";
DataFeederLoader.reportError(error);
myArray = null; //we should not continue as it is a wrong chain
}
if (myArray != null) {
//fill the parameter array of this class
String[] selectedRowArray = inputParameterArray.get(Integer.valueOf(selectedRow - 1));
myArray.put(0, selectedRowArray);
myArray.setParameterNames(inputParameterArray.getParameterNames()); //take care about the parameter names, too
}
return myArray;
}