Search in sources :

Example 1 with FreemarkerViewGenerator

use of org.jbehave.core.reporters.FreemarkerViewGenerator in project jbehave-core by jbehave.

the class CustomCoreStories method configuration.

@Override
public Configuration configuration() {
    Configuration configuration = super.configuration();
    Properties viewResources = new Properties();
    viewResources.put("reports", "ftl/custom-reports.ftl");
    configuration.useViewGenerator(new FreemarkerViewGenerator(this.getClass()));
    Keywords keywords = new LocalizedKeywords(new Locale("en"), "i18n/custom", "i18n/keywords", this.getClass().getClassLoader());
    StoryReporterBuilder reporterBuilder = configuration.storyReporterBuilder().withKeywords(keywords).withViewResources(viewResources).withFormats(CustomHtmlOutput.FORMAT);
    return configuration.useKeywords(keywords).useStepCollector(new MarkUnmatchedStepsAsPending(keywords)).useStoryParser(new RegexStoryParser(keywords)).useStoryReporterBuilder(reporterBuilder);
}
Also used : Locale(java.util.Locale) StoryReporterBuilder(org.jbehave.core.reporters.StoryReporterBuilder) Keywords(org.jbehave.core.configuration.Keywords) LocalizedKeywords(org.jbehave.core.i18n.LocalizedKeywords) RegexStoryParser(org.jbehave.core.parsers.RegexStoryParser) Configuration(org.jbehave.core.configuration.Configuration) FreemarkerViewGenerator(org.jbehave.core.reporters.FreemarkerViewGenerator) LocalizedKeywords(org.jbehave.core.i18n.LocalizedKeywords) Properties(java.util.Properties) MarkUnmatchedStepsAsPending(org.jbehave.core.steps.MarkUnmatchedStepsAsPending)

Aggregations

Locale (java.util.Locale)1 Properties (java.util.Properties)1 Configuration (org.jbehave.core.configuration.Configuration)1 Keywords (org.jbehave.core.configuration.Keywords)1 LocalizedKeywords (org.jbehave.core.i18n.LocalizedKeywords)1 RegexStoryParser (org.jbehave.core.parsers.RegexStoryParser)1 FreemarkerViewGenerator (org.jbehave.core.reporters.FreemarkerViewGenerator)1 StoryReporterBuilder (org.jbehave.core.reporters.StoryReporterBuilder)1 MarkUnmatchedStepsAsPending (org.jbehave.core.steps.MarkUnmatchedStepsAsPending)1