Hi All,
There is an issue in a project generated from jbehave-simple maven
archetype.
When using jbehave-core 4.1.2 as a dependency, the compiler complains about
missing ExampleTableFactory in MyStories.java:
@Override
public Configuration configuration() {
Class<? extends Embeddable> embeddableClass = this.getClass();
// Start from default ParameterConverters instance
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);
// add custom converters
parameterConverters.addConverters(new DateConverter(new
SimpleDateFormat("yyyy-MM-dd")),
new ExamplesTableConverter(examplesTableFactory));
return new MostUsefulConfiguration()
.useStoryLoader(new LoadFromClasspath(embeddableClass))
.useStoryParser(new RegexStoryParser(examplesTableFactory))
.useStoryReporterBuilder(new StoryReporterBuilder()
.withCodeLocation(CodeLocations.codeLocationFromClass(
embeddableClass))
.withDefaultFormats()
.withFormats(CONSOLE, TXT, HTML, XML))
.useParameterConverters(parameterConverters);
}
Can I suggest a patch for this code ? The below constructor compiles fine
and (im my opinion) is equivalent to the old one:
// factory to allow parameter conversion and loading from external
resources (used by StoryParser too)
ExamplesTableFactory examplesTableFactory = new ExamplesTableFactory
(
new LocalizedKeywords(),
new LoadFromClasspath(embeddableClass),
parameterConverters,
new TableTransformers());
--
You received this message because you are subscribed to the Google Groups
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
To view this discussion on the web, visit
https://groups.google.com/d/msgid/jbehave-user/36097ec7-b443-44e8-a8b9-0a2856d2f3b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.