Package org.jbehave.core.configuration

Examples of org.jbehave.core.configuration.MostUsefulConfiguration


    }

    @Override
    public Configuration configuration() {
        Class<? extends Embeddable> embeddableClass = this.getClass();
        return new MostUsefulConfiguration().useStoryLoader(new LoadFromClasspath(embeddableClass))
                .useStoryControls(new StoryControls().useStoryMetaPrefix("story_").useScenarioMetaPrefix("scenario_")) // optional prefixes
                .useStoryReporterBuilder(
                        new StoryReporterBuilder()
                                .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
                                .withDefaultFormats().withFormats(CONSOLE, HTML).withFailureTrace(true)
View Full Code Here


                .doIgnoreFailureInView(true).doVerboseFailures(true);
    }

    @Override
    public Configuration configuration() {
        Configuration configuration = new MostUsefulConfiguration();
        configuration.useStoryReporterBuilder(new StoryReporterBuilder()
                .withCodeLocation(CodeLocations.codeLocationFromClass(getClass())).withDefaultFormats()
                .withFormats(CONSOLE, TXT, HTML, XML));
        return configuration;
    }
View Full Code Here

    }

    @Override
    public Configuration configuration() {
        Class<? extends Embeddable> embeddableClass = this.getClass();
        return new MostUsefulConfiguration().useStoryLoader(new LoadFromClasspath(embeddableClass))
                .useStoryReporterBuilder(
                        new StoryReporterBuilder()
                                .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
                                .withDefaultFormats().withFormats(CONSOLE, HTML));
    }
View Full Code Here

public class ScalaStories extends JUnitStories {

    @Override
    public Configuration configuration() {
        return new MostUsefulConfiguration()
                .useStoryReporterBuilder(new StoryReporterBuilder().withFormats(ANSI_CONSOLE));
    }
View Full Code Here

import org.jbehave.examples.core.steps.ParametrisationByDelimitedNameSteps;

public class ParametrisationByDelimitedName extends JUnitStory {

    public ParametrisationByDelimitedName() {
        useConfiguration(new MostUsefulConfiguration()
                .useParameterControls(new ParameterControls().useDelimiterNamedParameters(true))
                .useStoryReporterBuilder(
                        new StoryReporterBuilder().withFormats(Format.CONSOLE)));
    }
View Full Code Here

import static org.jbehave.core.reporters.Format.TXT;

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)
View Full Code Here

        Properties viewResources = new Properties();
        viewResources.setProperty("index", "my-reports-index.ftl");
        viewResources.setProperty("decorateNonHtml", "true");

       
        return new MostUsefulConfiguration()
                    .useStoryControls(new StoryControls()
                            .doDryRun(true)
                            .doSkipScenariosAfterFailure(true))
                    .useFailureStrategy(new SilentlyAbsorbingFailure())
                    .useStoryLoader(new LoadFromURL())
View Full Code Here

   
    @Test
    public void shouldBuildDefaultConfigurationIfAnnotationNotPresent() {

        AnnotationBuilder builderNotAnnotated = createBuilder(NotAnnotated.class);
        assertThatConfigurationIs(builderNotAnnotated.buildConfiguration(), new MostUsefulConfiguration());
    }
View Full Code Here

    }

    @Test
    public void shouldBuildDefaultConfigurationIfAnnotationOrAnnotatedValuesNotPresent() {
        PicoAnnotationBuilder builderNotAnnotated = new PicoAnnotationBuilder(NotAnnotated.class);
        assertThatConfigurationIs(builderNotAnnotated.buildConfiguration(), new MostUsefulConfiguration());
        PicoAnnotationBuilder builderAnnotatedWithoutLocations = new PicoAnnotationBuilder(
                AnnotatedWithoutModules.class);
        assertThatConfigurationIs(builderAnnotatedWithoutLocations.buildConfiguration(), new MostUsefulConfiguration());
    }
View Full Code Here

public class ScanningStepsFactoryBehaviour {

  @Test
  public void shouldScanStepsFromRootClass() {
    InjectableStepsFactory factory = new ScanningStepsFactory(
        new MostUsefulConfiguration(), this.getClass());
    List<CandidateSteps> candidateSteps = factory.createCandidateSteps();
    assertThat(candidateSteps.size(), Matchers.greaterThan(1));
  }
View Full Code Here

TOP

Related Classes of org.jbehave.core.configuration.MostUsefulConfiguration

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.