use of org.jbehave.core.configuration.ParanamerConfiguration in project serenity-jbehave by serenity-bdd.
the class SerenityJBehave method defaultConfiguration.
// private static final CrossReference xref = new CrossReference();
/**
* Returns a default JBehave configuration object suitable for ThucydidesWebdriverIntegration tests.
*/
public static Configuration defaultConfiguration(net.thucydides.core.webdriver.Configuration systemConfiguration, List<Format> formats, Embeddable embeddable) {
Class<? extends Embeddable> embeddableClass = embeddable.getClass();
Properties viewResources = new Properties();
viewResources.put("decorateNonHtml", "true");
TableTransformers tableTransformers = new TableTransformers();
UTF8StoryLoader utf8StoryLoader = new UTF8StoryLoader();
return new ParanamerConfiguration().useTableTransformers(tableTransformers).useParameterConverters(new ParameterConverters(utf8StoryLoader, tableTransformers).addConverters(new ParameterConverters.DateConverter(), new DateListConverter(), new DateTimeConverter(), new DateTimeListConverter(), new YearMonthConverter(), new YearMonthListConverter(), new TimeConverter(), new TimeListConverter(), new ParameterConverters.EnumConverter(), new ParameterConverters.EnumListConverter())).useStoryReporterBuilder(new StoryReporterBuilder().withDefaultFormats().withFormats(formats.toArray(new Format[0])).withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass)).withViewResources(viewResources).withPathResolver(new FilePrintStreamFactory.ResolveToPackagedName()).withFailureTrace(true).withFailureTraceCompression(true).withReporters(new SerenityReporter(systemConfiguration))).useStoryLoader(utf8StoryLoader).useFailureStrategy(new IgnoreAssumptionViolations());
}
Aggregations