use of io.cucumber.cucumberexpressions.ParameterTypeRegistry in project cucumber-jvm by cucumber.
the class JavaSnippetTest method snippetForDocString.
private String snippetForDocString(String stepText, String docString, ParameterType<String> parameterType) {
Step step = createStepWithDocString(stepText, docString);
ParameterTypeRegistry parameterTypeRegistry = new ParameterTypeRegistry(Locale.ENGLISH);
parameterTypeRegistry.defineParameterType(parameterType);
List<String> snippet = new SnippetGenerator(new JavaSnippet(), parameterTypeRegistry).getSnippet(step, snippetType);
return String.join("\n", snippet);
}
use of io.cucumber.cucumberexpressions.ParameterTypeRegistry in project cucumber-jvm by cucumber.
the class JavaSnippetTest method snippetForDataTable.
private String snippetForDataTable(String stepText, ParameterType<String> parameterType) {
Step step = createStepWithDataTable(stepText);
ParameterTypeRegistry parameterTypeRegistry = new ParameterTypeRegistry(Locale.ENGLISH);
parameterTypeRegistry.defineParameterType(parameterType);
List<String> snippet = new SnippetGenerator(new JavaSnippet(), parameterTypeRegistry).getSnippet(step, snippetType);
return String.join("\n", snippet);
}
use of io.cucumber.cucumberexpressions.ParameterTypeRegistry in project cucumber-jvm by cucumber.
the class JavaSnippetTest method snippetFor.
private String snippetFor(String stepText) {
Step step = createStep(stepText);
List<String> snippet = new SnippetGenerator(new JavaSnippet(), new ParameterTypeRegistry(Locale.ENGLISH)).getSnippet(step, snippetType);
return String.join("\n", snippet);
}
use of io.cucumber.cucumberexpressions.ParameterTypeRegistry in project cucumber-jvm by cucumber.
the class JavaSnippetTest method snippetForDocString.
private String snippetForDocString(String stepText, String docString) {
Step step = createStepWithDocString(stepText, docString);
List<String> snippet = new SnippetGenerator(new JavaSnippet(), new ParameterTypeRegistry(Locale.ENGLISH)).getSnippet(step, snippetType);
return String.join("\n", snippet);
}
use of io.cucumber.cucumberexpressions.ParameterTypeRegistry in project cucumber-jvm by cucumber.
the class JavaSnippetTest method snippetForDataTable.
private String snippetForDataTable(String stepText) {
Step step = createStepWithDataTable(stepText);
List<String> snippet = new SnippetGenerator(new JavaSnippet(), new ParameterTypeRegistry(Locale.ENGLISH)).getSnippet(step, snippetType);
return String.join("\n", snippet);
}
Aggregations