public class ANSIConsoleOutput extends ConsoleOutput
Story reporter that outputs as ANSI-coded text to System.out.
Uses SGRCodes
to decorate ConsoleOutput format patterns.
PrintStreamOutput.Format
NL
Constructor and Description |
---|
ANSIConsoleOutput() |
ANSIConsoleOutput(Keywords keywords) |
ANSIConsoleOutput(Properties outputPatterns,
Keywords keywords,
boolean reportFailureTrace) |
Modifier and Type | Method and 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) |
afterExamples, afterGivenStories, afterScenario, afterStory, afterStorySteps, beforeExamples, beforeGivenStories, beforeScenario, beforeStep, beforeStory, beforeStorySteps, comment, compressFailureTrace, doCompressFailureTrace, doReportFailureTrace, dryRun, escape, example, failed, failedOutcomes, formatTable, formatVerbatim, givenStories, givenStories, ignorable, lifecyle, lookupPattern, narrative, notPerformed, overwritePattern, pending, pendingMethods, print, print, reportFailureTrace, restarted, restartedStory, scenarioNotAllowed, storyCancelled, storyNotAllowed, successful, toString, transformPrintingTable, transformPrintingVerbatim
afterScenarioSteps, beforeScenario, beforeScenarioSteps, example, scenarioMeta
public ANSIConsoleOutput()
public ANSIConsoleOutput(Keywords keywords)
public ANSIConsoleOutput(Properties outputPatterns, Keywords keywords, boolean reportFailureTrace)
public ANSIConsoleOutput assignCode(String key, SGRCodes.SGRCode code)
public ANSIConsoleOutput withCodes(SGRCodes codes)
protected String format(String key, String defaultPattern, Object... args)
PrintStreamOutput
format
in class PrintStreamOutput
key
- the event keydefaultPattern
- the default pattern to return if a custom pattern
is not foundargs
- the args used to format outputCopyright © 2003–2021. All rights reserved.