Search in sources :

Example 1 with SilentStepMonitor

use of org.jbehave.core.steps.SilentStepMonitor in project jbehave-core by jbehave.

the class CoreEmbedder method configuration.

@Override
public Configuration configuration() {
    Class<? extends CoreEmbedder> embedderClass = this.getClass();
    TableTransformers tableTransformers = new TableTransformers();
    LoadFromClasspath resourceLoader = new LoadFromClasspath(embedderClass.getClassLoader());
    return new MostUsefulConfiguration().useStoryLoader(resourceLoader).useStoryReporterBuilder(new StoryReporterBuilder().withCodeLocation(CodeLocations.codeLocationFromClass(embedderClass)).withDefaultFormats().withFormats(CONSOLE, TXT, HTML, XML).withCrossReference(new CrossReference())).useTableTransformers(tableTransformers).useParameterConverters(new ParameterConverters(resourceLoader, tableTransformers).addConverters(// use custom date pattern
    new DateConverter(new SimpleDateFormat("yyyy-MM-dd")))).useStepPatternParser(new RegexPrefixCapturingPatternParser(// use '%' instead of '$' to identify parameters
    "%")).useStepMonitor(new SilentStepMonitor());
}
Also used : StoryReporterBuilder(org.jbehave.core.reporters.StoryReporterBuilder) RegexPrefixCapturingPatternParser(org.jbehave.core.parsers.RegexPrefixCapturingPatternParser) DateConverter(org.jbehave.core.steps.ParameterConverters.DateConverter) LoadFromClasspath(org.jbehave.core.io.LoadFromClasspath) MostUsefulConfiguration(org.jbehave.core.configuration.MostUsefulConfiguration) SilentStepMonitor(org.jbehave.core.steps.SilentStepMonitor) ParameterConverters(org.jbehave.core.steps.ParameterConverters) CrossReference(org.jbehave.core.reporters.CrossReference) SimpleDateFormat(java.text.SimpleDateFormat) TableTransformers(org.jbehave.core.model.TableTransformers)

Aggregations

SimpleDateFormat (java.text.SimpleDateFormat)1 MostUsefulConfiguration (org.jbehave.core.configuration.MostUsefulConfiguration)1 LoadFromClasspath (org.jbehave.core.io.LoadFromClasspath)1 TableTransformers (org.jbehave.core.model.TableTransformers)1 RegexPrefixCapturingPatternParser (org.jbehave.core.parsers.RegexPrefixCapturingPatternParser)1 CrossReference (org.jbehave.core.reporters.CrossReference)1 StoryReporterBuilder (org.jbehave.core.reporters.StoryReporterBuilder)1 ParameterConverters (org.jbehave.core.steps.ParameterConverters)1 DateConverter (org.jbehave.core.steps.ParameterConverters.DateConverter)1 SilentStepMonitor (org.jbehave.core.steps.SilentStepMonitor)1