ParameterConverters parameterConverters = new ParameterConverters();
// factory to allow parameter conversion and loading from external
// resources (used by StoryParser too)
ExamplesTableFactory examplesTableFactory = new ExamplesTableFactory(
new LocalizedKeywords(),
new LoadFromClasspath(embeddableClass), parameterConverters);
// and add custom converters
parameterConverters.addConverters(
new ParameterConverters.DateConverter(new SimpleDateFormat(
"dd-MM-yyyy")),
new ParameterConverters.ExamplesTableConverter(
examplesTableFactory), new ParameterConverters.BooleanConverter(),
new NullAndEmptyStringConverter());
return new MostUsefulConfiguration()
.useFailureStrategy(new SilentlyAbsorbingFailure())
.useStoryLoader(new LoadFromClasspath(embeddableClass))
.useStoryParser(new RegexStoryParser(examplesTableFactory))
.usePendingStepStrategy(new FailingUponPendingStep())
.useStoryReporterBuilder(
new StoryReporterBuilder()
.withCodeLocation(codeLocationFromClass(embeddableClass))