use of org.jbehave.core.io.LoadFromURL in project jbehave-core by jbehave.
the class CoreStoriesUsingURLs method configuration.
@Override
public Configuration configuration() {
Configuration configuration = super.configuration();
StoryReporterBuilder builder = configuration.storyReporterBuilder();
builder.withPathResolver(new ResolveToSimpleName());
return configuration.useStoryLoader(new LoadFromURL());
}
use of org.jbehave.core.io.LoadFromURL in project jbehave-core by jbehave.
the class OdtLoaderBehaviour method shouldLoadOdtResourceFromURL.
@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());
}
use of org.jbehave.core.io.LoadFromURL in project jbehave-core by jbehave.
the class ConfigurationProducer method getConfiguration.
@Produces
@WeldConfiguration
Configuration getConfiguration() {
Properties viewResources = new Properties();
viewResources.setProperty("index", "my-reports-index.ftl");
viewResources.setProperty("decorateNonHtml", "true");
TableTransformers tableTransformers = new TableTransformers();
LoadFromURL resourceLoader = new LoadFromURL();
return new MostUsefulConfiguration().useStoryControls(new StoryControls().doDryRun(true).doSkipScenariosAfterFailure(true)).useFailureStrategy(new SilentlyAbsorbingFailure()).useStoryLoader(resourceLoader).useStepPatternParser(new RegexPrefixCapturingPatternParser("MyPrefix")).useStoryReporterBuilder(new StoryReporterBuilder().withDefaultFormats().withFormats(CONSOLE, HTML, TXT, XML).withKeywords(new LocalizedKeywords(Locale.ITALIAN)).withRelativeDirectory("my-output-directory").withViewResources(viewResources).withFailureTrace(true)).useParameterConverters(new ParameterConverters(resourceLoader, tableTransformers).addConverters(new CustomConverter(), new MyDateConverter())).useTableTransformers(tableTransformers);
}
Aggregations