Package org.jbehave.core.reporters
Class ANSIConsoleOutput
- java.lang.Object
-
- org.jbehave.core.reporters.NullStoryReporter
-
- org.jbehave.core.reporters.PrintStreamOutput
-
- org.jbehave.core.reporters.TxtOutput
-
- org.jbehave.core.reporters.ConsoleOutput
-
- org.jbehave.core.reporters.ANSIConsoleOutput
-
- All Implemented Interfaces:
StoryReporter
public class ANSIConsoleOutput extends ConsoleOutput
Story reporter that outputs as ANSI-coded text to System.out. Uses
SGRCodes
to decorate ConsoleOutput format patterns.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jbehave.core.reporters.PrintStreamOutput
PrintStreamOutput.Format
-
-
Field Summary
-
Fields inherited from class org.jbehave.core.reporters.PrintStreamOutput
NL
-
-
Constructor Summary
Constructors Constructor Description ANSIConsoleOutput()
ANSIConsoleOutput(Properties outputPatterns, Keywords keywords, boolean reportFailureTrace)
ANSIConsoleOutput(Keywords keywords)
-
Method Summary
Modifier and Type Method Description ANSIConsoleOutput
assignCode(String key, SGRCodes.SGRCode code)
protected String
format(String key, String defaultPattern, Object... args)
Formats event output by key, usually equal to the method name.ANSIConsoleOutput
withCodes(SGRCodes codes)
-
Methods inherited from class org.jbehave.core.reporters.PrintStreamOutput
afterComposedSteps, afterExamples, afterGivenStories, afterScenario, afterScenarios, afterScenarioSteps, afterStoriesSteps, afterStory, afterStorySteps, beforeComposedSteps, beforeExamples, beforeGivenStories, beforeScenario, beforeScenarios, beforeScenarioSteps, beforeStep, beforeStoriesSteps, beforeStory, beforeStorySteps, comment, compressFailureTrace, doCompressFailureTrace, doReportFailureTrace, dryRun, escape, example, failed, failedOutcomes, formatTable, formatVerbatim, givenStories, givenStories, ignorable, lifecycle, lookupPattern, narrative, notPerformed, overwritePattern, pending, print, print, reportFailureTrace, restarted, restartedStory, scenarioExcluded, storyCancelled, storyExcluded, successful, toString, transformPrintingTable, transformPrintingVerbatim
-
Methods inherited from class org.jbehave.core.reporters.NullStoryReporter
pending, pendingMethods
-
-
-
-
Constructor Detail
-
ANSIConsoleOutput
public ANSIConsoleOutput()
-
ANSIConsoleOutput
public ANSIConsoleOutput(Keywords keywords)
-
ANSIConsoleOutput
public ANSIConsoleOutput(Properties outputPatterns, Keywords keywords, boolean reportFailureTrace)
-
-
Method Detail
-
assignCode
public ANSIConsoleOutput assignCode(String key, SGRCodes.SGRCode code)
-
withCodes
public ANSIConsoleOutput withCodes(SGRCodes codes)
-
format
protected String format(String key, String defaultPattern, Object... args)
Description copied from class:PrintStreamOutput
Formats event output by key, usually equal to the method name.- Overrides:
format
in classPrintStreamOutput
- Parameters:
key
- the event keydefaultPattern
- the default pattern to return if a custom pattern is not foundargs
- the args used to format output- Returns:
- A formatted event output
-
-