use of gherkin.formatter.model.DocString in project cucumber-jvm by cucumber.
the class GosuSnippetTest method generatesSnippetWithDocString.
@Test
public void generatesSnippetWithDocString() {
String expected = "" + "Dsl.Given('^I have:$', \\ arg1 : String -> {\n" + " // Write code here that turns the phrase above into concrete actions\n" + " throw new PendingException()\n" + "})\n";
assertEquals(expected, snippetForDocString("I have:", new DocString("text/plain", "hello", 1)));
}
use of gherkin.formatter.model.DocString in project cucumber-jvm by cucumber.
the class GroovySnippetTest method generatesSnippetWithDocString.
@Test
public void generatesSnippetWithDocString() {
String expected = "" + "Given(~/^I have:$/) { String arg1 ->\n" + " // Write code here that turns the phrase above into concrete actions\n" + " throw new PendingException()\n" + "}\n";
assertEquals(expected, snippetForDocString("I have:", new DocString("text/plain", "hello", 1)));
}
use of gherkin.formatter.model.DocString in project cucumber-jvm by cucumber.
the class CucumberScenarioOutlineTest method allows_doc_strings_to_be_empty_after_replacement.
@Test
public void allows_doc_strings_to_be_empty_after_replacement() {
Step outlineStep = new Step(C, null, "Some step", 0, null, new DocString(null, "<doc string>", 1));
Step exampleStep = CucumberScenarioOutline.createExampleStep(outlineStep, new ExamplesTableRow(C, asList("doc string"), 1, ""), new ExamplesTableRow(C, asList(""), 1, ""));
assertEquals("", exampleStep.getDocString().getValue());
}
Aggregations