Package org.jbehave.core.io

Examples of org.jbehave.core.io.LoadFromURL


    @Test
    public void shouldLoadOdtResourceFromURL() {
        String location = CodeLocations.codeLocationFromClass(this.getClass()).toString();
        String resourceFromOdtWithTable = new LoadOdtFromURL().loadResourceAsText(location
                + "org/jbehave/core/io/odf/stories/a_story.odt");
        String resourceFromTxt = new LoadFromURL().loadResourceAsText(location
                + "org/jbehave/core/io/odf/stories/a_story.txt");
        assertThatOutputIs(resourceFromOdtWithTable.trim(), resourceFromTxt.trim());
    }
View Full Code Here


*/
public class URLCoreEmbedder extends CoreEmbedder {

    @Override
    public Configuration configuration() {
        return super.configuration().useStoryLoader(new LoadFromURL());
    }
View Full Code Here

    @Override
    public Configuration configuration() {
        Configuration configuration = super.configuration();       
        StoryReporterBuilder builder = configuration.storyReporterBuilder();
        builder.withPathResolver(new ResolveToSimpleName());
        return configuration.useStoryLoader(new LoadFromURL());
    }
View Full Code Here

public class RemoteCoreStories extends CoreStories {

    @Override
    public Configuration configuration() {
        return super.configuration()
               .useStoryLoader(new LoadFromURL())
               .useStoryReporterBuilder(
                       new StoryReporterBuilder()
                           .withCodeLocation(codeLocationFromURL("http://jbehave.org/reference/examples/stories/"))
                           .withDefaultFormats()
                           .withFormats(CONSOLE, TXT, HTML, XML));
View Full Code Here

        @Override
        protected void configure() {
            bind(StoryControls.class).toInstance(new StoryControls().doDryRun(true).doSkipScenariosAfterFailure(true));
            bind(FailureStrategy.class).to(SilentlyAbsorbingFailure.class);
            bind(StepPatternParser.class).toInstance(new RegexPrefixCapturingPatternParser("MyPrefix"));
            bind(StoryLoader.class).toInstance(new LoadFromURL());
            Properties viewResources = new Properties();
            viewResources.setProperty("index", "my-reports-index.ftl");
            viewResources.setProperty("decorateNonHtml", "true");
            bind(StoryReporterBuilder.class).toInstance(
                    new StoryReporterBuilder().withDefaultFormats().withFormats(CONSOLE, HTML, TXT, XML).withKeywords(
View Full Code Here

        return new MostUsefulConfiguration()
                    .useStoryControls(new StoryControls()
                            .doDryRun(true)
                            .doSkipScenariosAfterFailure(true))
                    .useFailureStrategy(new SilentlyAbsorbingFailure())
                    .useStoryLoader(new LoadFromURL())
                    .useStepPatternParser(new RegexPrefixCapturingPatternParser("MyPrefix"))
                    .useStoryReporterBuilder(new StoryReporterBuilder()
                            .withDefaultFormats()
                            .withFormats(CONSOLE, HTML, TXT, XML)
                            .withKeywords(new LocalizedKeywords(Locale.ITALIAN))
View Full Code Here

        public void configure(MutablePicoContainer container) {
            container.addComponent(StoryControls.class, new StoryControls().doDryRun(true).doSkipScenariosAfterFailure(true));
            container.addComponent(FailureStrategy.class, SilentlyAbsorbingFailure.class);
            container.addComponent(StepPatternParser.class, new RegexPrefixCapturingPatternParser("MyPrefix"));
            container.addComponent(StoryLoader.class, new LoadFromURL());
            container.addComponent(ParameterConverter.class, new DateConverter(new SimpleDateFormat("yyyy-MM-dd")));
            Properties viewResources = new Properties();
            viewResources.setProperty("index", "my-reports-index.ftl");
            viewResources.setProperty("decorateNonHtml", "true");
            container.addComponent(new StoryReporterBuilder().withDefaultFormats().withFormats(CONSOLE, HTML, TXT, XML)
View Full Code Here

    }

    private static class PrivateModule implements PicoModule {

        public void configure(MutablePicoContainer container) {
            container.addComponent(StoryLoader.class, new LoadFromURL());
        }
View Full Code Here

TOP

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

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.