Package org.jbehave.core.io

Examples of org.jbehave.core.io.UnderscoredCamelCaseResolver


        when(classLoader.newInstance(Embeddable.class, myOtherEmbeddableName)).thenReturn(myOtherEmbeddable);

        // When
        Embedder embedder = embedderWith(runner, embedderControls, monitor);
        embedder.useClassLoader(classLoader);
        embedder.configuration().useStoryPathResolver(new UnderscoredCamelCaseResolver());
        embedder.runAsEmbeddables(classNames);

        // Then
        assertThat(out.toString(), not(containsString("Running embeddable " + myEmbeddableName)));
        assertThat(out.toString(), containsString("Running embeddable " + myOtherEmbeddableName));
View Full Code Here


        when(classLoader.newInstance(Embeddable.class, myOtherEmbeddableName)).thenReturn(myOtherEmbeddable);

        // When
        Embedder embedder = embedderWith(runner, embedderControls, monitor);
        embedder.useClassLoader(classLoader);
        embedder.configuration().useStoryPathResolver(new UnderscoredCamelCaseResolver());
        embedder.runAsEmbeddables(classNames);

        // Then
        for (Embeddable embeddable : embeddables) {
            assertThat(out.toString(), not(containsString("Running embeddable " + embeddable.getClass().getName())));
View Full Code Here

        return new MostUsefulConfiguration()
                .useStoryControls(new StoryControls().doDryRun(false).doSkipScenariosAfterFailure(false))
                .useStoryLoader(new LoadFromClasspath(embeddableClass))
                .useStoryParser(new RegexStoryParser(examplesTableFactory))
                .useStoryPathResolver(new UnderscoredCamelCaseResolver())
                .useStoryReporterBuilder(
                        new StoryReporterBuilder()
                                .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
                                .withDefaultFormats().withPathResolver(new ResolveToPackagedName())
                                .withViewResources(viewResources).withFormats(CONSOLE, TXT, HTML, XML)
View Full Code Here

        viewGenerator.generateReportsView(outputDirectory, asList("html"), templates);
        // Then ... fail as expected
    }

    private String storyPath(Class<MyStory> storyClass) {
        StoryPathResolver resolver = new UnderscoredCamelCaseResolver(".story");
        return resolver.resolve(storyClass);
    }
View Full Code Here

        assertThat(delegates.contains(txtReporter), is(true));
        assertThat(delegates.contains(htmlReporter), is(true));
    }

    private String storyPath(Class<MyStory> storyClass) {
        StoryPathResolver resolver = new UnderscoredCamelCaseResolver(".story");
        return resolver.resolve(storyClass);
    }
View Full Code Here

      keywords = new LocalizedKeywords();
     
      stepCollector = new MarkUnmatchedStepsAsPending();
      storyParser = new RegexStoryParser(keywords);
      storyLoader = new LoadFromClasspath();
      storyPathResolver = new UnderscoredCamelCaseResolver();
      failureStrategy = new RethrowingFailure();
      pendingStepStrategy = new PassingUponPendingStep();
      defaultStoryReporter = new ConsoleOutput();
      storyReporterBuilder = new StoryReporterBuilder();
      stepFinder = new StepFinder();
View Full Code Here

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

        Keywords keywords = new LocalizedKeywords(new Locale("lc"),
                "i18n/keywords", classLoader);
        Configuration configuration = new MostUsefulConfiguration()
            .useKeywords(keywords)
            .useStoryParser(new RegexStoryParser(keywords))
            .useStoryPathResolver(new UnderscoredCamelCaseResolver(""))
            .useStoryReporterBuilder(new StoryReporterBuilder()
                    .withCodeLocation(codeLocation)
                    .withDefaultFormats()
                    .withFormats(CONSOLE, TXT)
                    .withFailureTrace(true)
View Full Code Here

public class PreferredConfiguration extends MostUsefulConfiguration {
 
  public PreferredConfiguration(String storyUrl) {
    URL codeLocation = CodeLocations.codeLocationFromURL(storyUrl);
    Properties viewResources = new Properties();
    StoryPathResolver storyPathResolver = new UnderscoredCamelCaseResolver(
        ".story");
    StoryReporterBuilder srb = new StoryReporterBuilder()
        .withDefaultFormats()
        .withViewResources(viewResources)
                .withRelativeDirectory(".." + File.separator + Config.getLatestReportsDir())
View Full Code Here

TOP

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

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.