/** * Creates an {@link InstanceStepsFactory} with the given {@link Configuration} for the given {@link com.epam.gepard.gherkin.jbehave.JBehaveTestCase}. * @param configuration the configuration to use * @param testCase the test case which will be used in the step creation process * @return a new instance of {@link InstanceStepsFactory} */ public InstanceStepsFactory createForTestCase(final Configuration configuration, final JBehaveTestCase testCase) { return new InstanceStepsFactory(configuration, testCase); }
protected InjectableStepsFactory stepsFactory() { return new InstanceStepsFactory(configuration(), candidateSteps().toArray()); }
protected InjectableStepsFactory stepsFactory() { return new InstanceStepsFactory(configuration(), candidateSteps().toArray()); }
@Override public InjectableStepsFactory stepsFactory() { List<Object> steps = BeanUtils.getAsInstances(stepsClasses); if (steps.size() != stepsClasses.size()) { report.report("Not all test classes were initialized successfully. Some stories may not run properly.", Reporter.WARNING); } return new InstanceStepsFactory(configuration(), steps); }
public abstract class NoughtsAndCrossesStory extends JUnitStory { public NoughtsAndCrossesStory() { Configuration configuration = new MostUsefulConfiguration() .useStoryPathResolver(new UnderscoredCamelCaseResolver("")) .useStoryReporterBuilder(new StoryReporterBuilder() .withCodeLocation(CodeLocations.codeLocationFromClass(this.getClass())) .withDefaultFormats() .withFormats(CONSOLE, TXT) .withFailureTrace(true)); useConfiguration(configuration); WindowControl windowControl = new WindowControl(); addSteps(new InstanceStepsFactory(configuration,new GridSteps(windowControl), new BeforeAndAfterSteps(windowControl)).createCandidateSteps()); } }
@Override public final InjectableStepsFactory stepsFactory() { final Configuration configuration = configuration(); final List<Object> steps = stepsInstances(); steps.add(lifecycleSteps); steps.add(new WebDriverScreenshotOnFailure(driverProvider, configuration.storyReporterBuilder())); return new InstanceStepsFactory(configuration(), steps); }
@Override public InjectableStepsFactory stepsFactory() { return new InstanceStepsFactory(configuration(), new UserRegistrationSteps()); }
@Override public InjectableStepsFactory stepsFactory() { return new InstanceStepsFactory(configuration(), new UserRegistrationSteps()); }
@Override public InjectableStepsFactory stepsFactory() { // Limpa os passos atuais steps.clear(); // Pega os steps do Context steps.addAll(BehaveContext.getInstance().getSteps()); if (BehaveConfig.getParser_BeforeAfterStepsEnabled()) { steps.add(new BeforeAfterSteps()); } if (BehaveConfig.getParser_CommonsStepsEnabled()) { steps.add(new CommonSteps()); steps.add(new DataProviderSteps()); steps.add(new DialogSteps()); steps.add(new DebugSteps()); steps.add(new TableSteps()); steps.add(new MouseControlSteps()); steps.add(new DataGenerationSteps()); steps.add(new CheckBoxRadioSteps()); } return new InstanceStepsFactory(configuration(), steps.toArray()); }