use of io.cucumber.core.gherkin.DocStringArgument in project cucumber-jvm by cucumber.
the class ArgumentMatcher method argumentsFrom.
public List<Argument> argumentsFrom(Step step, Type... types) {
io.cucumber.core.gherkin.Argument arg = step.getArgument();
if (arg == null) {
return expression.match(step.getText(), types);
}
if (arg instanceof io.cucumber.core.gherkin.DocStringArgument) {
DocStringArgument docString = (DocStringArgument) arg;
String content = docString.getContent();
String contentType = docString.getMediaType();
return expression.match(step.getText(), content, contentType, types);
}
if (arg instanceof io.cucumber.core.gherkin.DataTableArgument) {
DataTableArgument table = (DataTableArgument) arg;
List<List<String>> cells = emptyCellsToNull(table.cells());
return expression.match(step.getText(), cells, types);
}
throw new IllegalStateException("Argument was neither PickleString nor PickleTable");
}
Aggregations