Package org.jbehave.core.io

Examples of org.jbehave.core.io.LoadFromClasspath


    @Override
    public Configuration configuration() {
        return new SeleniumConfiguration().useSeleniumContext(seleniumContext)
                .usePendingStepStrategy(pendingStepStrategy)
                .useStoryControls(new StoryControls().doResetStateBeforeScenario(false)).useStepMonitor(stepMonitor)
                .useStoryLoader(new LoadFromClasspath(EtsyDotComStories.class))
                .useStoryReporterBuilder(reporterBuilder);
    }
View Full Code Here


    builder = builder.withCodeLocation(
        CodeLocations.codeLocationFromClass(embeddableClass))
        .withDefaultFormats().withFormats(IDE_CONSOLE, TXT, HTML, XML);
    return new SeleniumConfiguration().useSeleniumContext(context)
        .useWebDriverFactory(driverFactory).useStepMonitor(monitor)
        .useStoryLoader(new LoadFromClasspath(embeddableClass))
        .useStoryReporterBuilder(builder);
  }
View Full Code Here

        .withCrossReference(crossReference);

    Configuration configuration = new SeleniumConfiguration().useSeleniumContext(seleniumContext)
        .useFailureStrategy(new FailingUponPendingStep())
        .useStoryControls(new StoryControls().doResetStateBeforeScenario(false)).useStepMonitor(stepMonitor)
        .useStoryLoader(new LoadFromClasspath(this.getClass()))
        .useStoryReporterBuilder(reporterBuilder);
    useConfiguration(configuration);

    ApplicationContext context = new SpringApplicationContextFactory("applicationContext-tests.xml").createApplicationContext();
    useStepsFactory(new SpringStepsFactory(configuration, context));
View Full Code Here

    public Configuration configuration() {
        Class<? extends Embeddable> embeddableClass = this.getClass();
        // Start from default ParameterConverters instance
        ParameterConverters parameterConverters = new ParameterConverters();
        // factory to allow parameter conversion and loading from external resources (used by StoryParser too)
        ExamplesTableFactory examplesTableFactory = new ExamplesTableFactory(new LocalizedKeywords(), new LoadFromClasspath(embeddableClass), parameterConverters);
        // add custom converters
        parameterConverters.addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")),
                new ExamplesTableConverter(examplesTableFactory));
        return new MostUsefulConfiguration()
            .useStoryLoader(new LoadFromClasspath(embeddableClass))
            .useStoryParser(new RegexStoryParser(examplesTableFactory))
            .useStoryReporterBuilder(new StoryReporterBuilder()
                .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
                .withDefaultFormats()
                .withFormats(CONSOLE, TXT, HTML, XML))
View Full Code Here

    }

    @Override
    public Configuration configuration() {
        return new MostUsefulConfiguration()
                .useStoryLoader(new LoadFromClasspath(this.getClass()))
                .useStoryReporterBuilder(new StoryReporterBuilder()
                        .withFormats(Format.TXT)
                        .withRelativeDirectory("../build/jbehave/"));
    }
View Full Code Here

    @Override
    public Configuration configuration() {
        return new MostUsefulConfiguration()
                // where to find the stories
                .useStoryLoader(new LoadFromClasspath(this.getClass()))
                        // Fails if Steps are not implemented
                .usePendingStepStrategy(new FailingUponPendingStep())
                        // CONSOLE and HTML reporting
                .useStoryReporterBuilder(new StoryReporterBuilder().withDefaultFormats()
                        .withFormats(Format.CONSOLE, Format.HTML));
View Full Code Here

    ParameterConverters parameterConverters = new ParameterConverters();
    // factory to allow parameter conversion and loading from external
    // resources (used by StoryParser too)
    ExamplesTableFactory examplesTableFactory = new ExamplesTableFactory(
        new LocalizedKeywords(),
        new LoadFromClasspath(embeddableClass), parameterConverters);
    // and add custom converters
    parameterConverters.addConverters(
        new ParameterConverters.DateConverter(new SimpleDateFormat(
            "dd-MM-yyyy")),
        new ParameterConverters.ExamplesTableConverter(
            examplesTableFactory), new ParameterConverters.BooleanConverter(),
            new NullAndEmptyStringConverter());

    return new MostUsefulConfiguration()
        .useFailureStrategy(new SilentlyAbsorbingFailure())
        .useStoryLoader(new LoadFromClasspath(embeddableClass))
        .useStoryParser(new RegexStoryParser(examplesTableFactory))
        .usePendingStepStrategy(new FailingUponPendingStep())
        .useStoryReporterBuilder(
            new StoryReporterBuilder()
                .withCodeLocation(codeLocationFromClass(embeddableClass))
View Full Code Here

TOP

Related Classes of org.jbehave.core.io.LoadFromClasspath

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.