Package org.jbehave.core.reporters
Class FilePrintStreamFactory
java.lang.Object
org.jbehave.core.reporters.FilePrintStreamFactory
- All Implemented Interfaces:
PrintStreamFactory
Creates
PrintStream instances that write to a file identified by the
StoryLocation. FilePrintStreamFactory.FileConfiguration specifies directory and the
extension, providing useful default values.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classResolves directory from code location parent file.static classConfiguration class for file print streams.static interfacestatic classclassstatic classResolves story location path to java packaged name, replacing '/' with '.'static classResolves story location path to simple name, considering portion after last '/'. -
Constructor Summary
ConstructorsConstructorDescriptionFilePrintStreamFactory(StoryLocation storyLocation) FilePrintStreamFactory(StoryLocation storyLocation, FilePrintStreamFactory.FileConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionprotected FileReturn the file output directory, using the configuredFilePrintStreamFactory.FilePathResolverprotected Fileprotected StringReturn the file output name, using the configuredFilePrintStreamFactory.FilePathResolvervoiduseConfiguration(FilePrintStreamFactory.FileConfiguration configuration)
-
Constructor Details
-
FilePrintStreamFactory
-
FilePrintStreamFactory
public FilePrintStreamFactory(StoryLocation storyLocation, FilePrintStreamFactory.FileConfiguration configuration)
-
-
Method Details
-
createPrintStream
- Specified by:
createPrintStreamin interfacePrintStreamFactory
-
getOutputFile
-
useConfiguration
-
configuration
-
outputFile
-
outputDirectory
Return the file output directory, using the configuredFilePrintStreamFactory.FilePathResolver- Returns:
- The File representing the output directory
-
outputName
Return the file output name, using the configuredFilePrintStreamFactory.FilePathResolver- Returns:
- The file output name
-