Search in sources :

Example 1 with StepMatch

use of org.jbehave.core.embedder.MatchingStepMonitor.StepMatch in project jbehave-core by jbehave.

the class CrossReferenceBehaviour method performableRoot.

private PerformableRoot performableRoot() {
    PerformableRoot root = new PerformableRoot();
    Story story = new Story("/path/to/story", new Description("An interesting story"), new Meta(Arrays.asList("+theme testing", "+author Mauro")), new Narrative("renovate my house", "customer", "get a loan"), new ArrayList<Scenario>());
    PerformableStory performableStory = new PerformableStory(story, new LocalizedKeywords(), false);
    root.add(performableStory);
    Scenario scenario = new Scenario(Arrays.asList(""));
    PerformableScenario performableScenario = new PerformableScenario(scenario, story.getPath());
    performableStory.add(performableScenario);
    List<StepMatch> stepMatches = new ArrayList<>();
    stepMatches.add(new StepMatch(new StepPattern(StepType.GIVEN, "(def)", "[abc]")));
    NormalPerformableScenario normalScenario = new NormalPerformableScenario(scenario);
    normalScenario.addSteps(new PerformableSteps(null, stepMatches));
    performableScenario.useNormalScenario(normalScenario);
    return root;
}
Also used : ArrayList(java.util.ArrayList) LocalizedKeywords(org.jbehave.core.i18n.LocalizedKeywords) StepMatch(org.jbehave.core.embedder.MatchingStepMonitor.StepMatch)

Example 2 with StepMatch

use of org.jbehave.core.embedder.MatchingStepMonitor.StepMatch in project jbehave-core by jbehave.

the class SurefireReporterBehaviour method performableRoot.

private PerformableRoot performableRoot() {
    PerformableRoot root = new PerformableRoot();
    Story story = new Story("/path/to/story", new Description("An interesting story"), new Meta(Arrays.asList("+theme testing", "+author Mauro")), new Narrative("renovate my house", "customer", "get a loan"), new ArrayList<Scenario>());
    PerformableStory performableStory = new PerformableStory(story, new LocalizedKeywords(), false);
    root.add(performableStory);
    Scenario scenario = new Scenario(Arrays.asList(""));
    PerformableScenario performableScenario = new PerformableScenario(scenario, story.getPath());
    performableStory.add(performableScenario);
    List<StepMatch> stepMatches = new ArrayList<>();
    stepMatches.add(new StepMatch(new StepPattern(StepType.GIVEN, "(def)", "[abc]")));
    NormalPerformableScenario normalScenario = new NormalPerformableScenario(scenario);
    normalScenario.addSteps(new PerformableSteps(null, stepMatches));
    performableScenario.useNormalScenario(normalScenario);
    return root;
}
Also used : ArrayList(java.util.ArrayList) LocalizedKeywords(org.jbehave.core.i18n.LocalizedKeywords) StepMatch(org.jbehave.core.embedder.MatchingStepMonitor.StepMatch)

Aggregations

ArrayList (java.util.ArrayList)2 StepMatch (org.jbehave.core.embedder.MatchingStepMonitor.StepMatch)2 LocalizedKeywords (org.jbehave.core.i18n.LocalizedKeywords)2