use of org.jbehave.core.embedder.PerformableTree.PerformableScenario in project serenity-jbehave by serenity-bdd.
the class JUnitDescriptionGenerator method insertDescriptionForExamples.
private void insertDescriptionForExamples(PerformableScenario performableScenario, Description scenarioDescription) {
Scenario scenario = performableScenario.getScenario();
for (ExamplePerformableScenario examplePerformableScenario : performableScenario.getExamples()) {
Description exampleRowDescription = Description.createSuiteDescription(configuration.keywords().examplesTableRow() + " " + examplePerformableScenario.getParameters());
scenarioDescription.addChild(exampleRowDescription);
if (hasGivenStories(scenario)) {
insertGivenStories(scenario, exampleRowDescription);
}
addScenarioSteps(ScenarioType.EXAMPLE, scenario, exampleRowDescription);
}
}
use of org.jbehave.core.embedder.PerformableTree.PerformableScenario in project serenity-jbehave by serenity-bdd.
the class JUnitDescriptionGenerator method createDescriptionFrom.
public Description createDescriptionFrom(PerformableScenario performableScenario) {
Scenario scenario = performableScenario.getScenario();
Description scenarioDescription = createDescriptionForScenario(scenario);
if (performableScenario.hasExamples() && !scenario.getGivenStories().requireParameters()) {
insertDescriptionForExamples(performableScenario, scenarioDescription);
} else {
if (hasGivenStories(scenario)) {
insertGivenStories(scenario, scenarioDescription);
}
addScenarioSteps(ScenarioType.NORMAL, scenario, scenarioDescription);
}
return scenarioDescription;
}
Aggregations