use of cucumber.runtime.table.TableConverter in project cucumber-jvm by cucumber.
the class StepDefinitionMatch method tableArgument.
private Object tableArgument(Step step, int argIndex, LocalizedXStreams.LocalizedXStream xStream) {
ParameterInfo parameterInfo = getParameterType(argIndex, DataTable.class);
TableConverter tableConverter = new TableConverter(xStream, parameterInfo);
DataTable table = new DataTable(step.getRows(), tableConverter);
Type type = parameterInfo.getType();
return tableConverter.convert(table, type, parameterInfo.isTransposed());
}
use of cucumber.runtime.table.TableConverter in project cucumber-jvm by cucumber.
the class DataTable method create.
private static DataTable create(List<?> raw, Locale locale, String format, String... columnNames) {
ParameterInfo parameterInfo = new ParameterInfo(null, format, null, null);
TableConverter tableConverter = new TableConverter(new LocalizedXStreams(Thread.currentThread().getContextClassLoader()).get(locale), parameterInfo);
return tableConverter.toTable(raw, columnNames);
}
Aggregations