Search in sources :

Example 1 with StubStepDefinition

use of cucumber.runtime.StubStepDefinition in project cucumber-jvm by cucumber.

the class FromDataTableTest method runStepDef.

private StepDefs runStepDef(Method method, List<DataTableRow> rows) throws Throwable {
    StepDefs stepDefs = new StepDefs();
    StepDefinition stepDefinition = new StubStepDefinition(stepDefs, method, "some pattern");
    Step stepWithRows = new Step(NO_COMMENTS, "Given ", "something", 10, rows, null);
    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    StepDefinitionMatch stepDefinitionMatch = new StepDefinitionMatch(NO_ARGS, stepDefinition, "some.feature", stepWithRows, new LocalizedXStreams(classLoader));
    stepDefinitionMatch.runStep(new I18n("en"));
    return stepDefs;
}
Also used : StubStepDefinition(cucumber.runtime.StubStepDefinition) StepDefinition(cucumber.runtime.StepDefinition) StubStepDefinition(cucumber.runtime.StubStepDefinition) Step(gherkin.formatter.model.Step) StepDefinitionMatch(cucumber.runtime.StepDefinitionMatch) LocalizedXStreams(cucumber.runtime.xstream.LocalizedXStreams) I18n(gherkin.I18n)

Aggregations

StepDefinition (cucumber.runtime.StepDefinition)1 StepDefinitionMatch (cucumber.runtime.StepDefinitionMatch)1 StubStepDefinition (cucumber.runtime.StubStepDefinition)1 LocalizedXStreams (cucumber.runtime.xstream.LocalizedXStreams)1 I18n (gherkin.I18n)1 Step (gherkin.formatter.model.Step)1