Search in sources :

Example 1 with ExamplePerformableScenario

use of org.jbehave.core.embedder.PerformableTree.ExamplePerformableScenario 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);
    }
}
Also used : Description(org.junit.runner.Description) ExamplePerformableScenario(org.jbehave.core.embedder.PerformableTree.ExamplePerformableScenario) PerformableScenario(org.jbehave.core.embedder.PerformableTree.PerformableScenario) Scenario(org.jbehave.core.model.Scenario) ExamplePerformableScenario(org.jbehave.core.embedder.PerformableTree.ExamplePerformableScenario)

Aggregations

ExamplePerformableScenario (org.jbehave.core.embedder.PerformableTree.ExamplePerformableScenario)1 PerformableScenario (org.jbehave.core.embedder.PerformableTree.PerformableScenario)1 Scenario (org.jbehave.core.model.Scenario)1 Description (org.junit.runner.Description)1