[
https://jira.codehaus.org/browse/JBEHAVE-637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=283669#comment-283669
]
Mauro Talevi commented on JBEHAVE-637:
--------------------------------------
The main usecase for the Format is to abstract the interaction with the
StoryReporterBuilder, which creates the FilePrintStreamFactory and hands it
over to the Format.createStoryReporter() method. It also makes it much
simpler to define reporters in the configuration.
The StoryReporterBuilder.build(path) method is invoked once per story (via the
Configuration.storyReporter(path)) in the StoryRunner.
I'm struggling to see how the Format may feel an unncessary separation. IMO,
Format.HTML or new Format("HTML") is simpler than
{code}
public static final Format HTML = new Format("HTML") {
@Override
public StoryReporter createStoryReporter(FilePrintStreamFactory factory,
StoryReporterBuilder storyReporterBuilder) {
factory.useConfiguration(storyReporterBuilder.fileConfiguration("html"));
return new HtmlOutput(factory.createPrintStream(),
storyReporterBuilder.keywords()).doReportFailureTrace(
storyReporterBuilder.reportFailureTrace()).doCompressFailureTrace(
storyReporterBuilder.compressFailureTrace());
}
};
{code}
> Eliminate Format as a factory for StoryReporter
> ------------------------------------------------
>
> Key: JBEHAVE-637
> URL: https://jira.codehaus.org/browse/JBEHAVE-637
> Project: JBehave
> Issue Type: Improvement
> Components: Core
> Reporter: Paul Hammant
> Fix For: 3.x
>
>
> StoryReporter is made by Format, and that feels an unnecessary OO separation.
> Making custom reporters is cumbersome as a result. Can we kill the Format
> class?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email