API Documentation
Public Member Functions | List of all members
nkDebug::OutputFormatter Class Reference

Base class for test's output formatting. More...

Inheritance diagram for nkDebug::OutputFormatter:
nkDebug::ConsoleOutputFormatter nkDebug::NunitOutputFormatter

Public Member Functions

 OutputFormatter () noexcept
 
virtual ~OutputFormatter ()
 
virtual nkMemory::String formatRunLaunch (const TestRunParameters &params)
 
virtual nkMemory::String formatRunEnd ()
 
virtual nkMemory::String formatClassLaunch (const TestClassObserverInformation &info)
 
virtual nkMemory::String formatClassBypass (const TestClassObserverInformation &info)
 
virtual nkMemory::String formatClassEnd (const TestClassObserverInformation &info)
 
virtual nkMemory::String formatTestLaunch (const TestFunctionObserverInformation &info)
 
virtual nkMemory::String formatTestBypass (const TestFunctionObserverInformation &info)
 
virtual nkMemory::String formatTestSuccess (const TestFunctionObserverInformation &info)
 
virtual nkMemory::String formatTestFailure (const TestFunctionObserverInformation &info)
 

Detailed Description

Base class for test's output formatting.

To format results from tests, it is possible to implement this class. It can then be plugged within a test run's parameter structure.

Constructor & Destructor Documentation

◆ OutputFormatter()

nkDebug::OutputFormatter::OutputFormatter ( )
noexcept

Default constructor.

◆ ~OutputFormatter()

virtual nkDebug::OutputFormatter::~OutputFormatter ( )
virtual

Destructor.

Member Function Documentation

◆ formatRunLaunch()

virtual nkMemory::String nkDebug::OutputFormatter::formatRunLaunch ( const TestRunParameters params)
virtual

Called when a run is starting.

Parameters
paramsThe parameters provided for the run.
Returns
A formatted string to use for logging.

Reimplemented in nkDebug::ConsoleOutputFormatter, and nkDebug::NunitOutputFormatter.

◆ formatRunEnd()

virtual nkMemory::String nkDebug::OutputFormatter::formatRunEnd ( )
virtual

Called when a run is ending.

Returns
A formatted string to use for logging.

Reimplemented in nkDebug::ConsoleOutputFormatter, and nkDebug::NunitOutputFormatter.

◆ formatClassLaunch()

virtual nkMemory::String nkDebug::OutputFormatter::formatClassLaunch ( const TestClassObserverInformation info)
virtual

Called when a TestClass is being prepared to run its functions.

Parameters
infoCurrent information about the run.
Returns
Returns a formatted string to use for logging.

Reimplemented in nkDebug::ConsoleOutputFormatter, and nkDebug::NunitOutputFormatter.

◆ formatClassBypass()

virtual nkMemory::String nkDebug::OutputFormatter::formatClassBypass ( const TestClassObserverInformation info)
virtual

Called when a TestClass is being bypassed.

Parameters
infoCurrent information about the run.
Returns
Returns a formatted string to use for logging.

Reimplemented in nkDebug::ConsoleOutputFormatter, and nkDebug::NunitOutputFormatter.

◆ formatClassEnd()

virtual nkMemory::String nkDebug::OutputFormatter::formatClassEnd ( const TestClassObserverInformation info)
virtual

Called when a TestClass finished running its functions.

Parameters
infoCurrent information about the run.
Returns
Returns a formatted string to use for logging.

Reimplemented in nkDebug::ConsoleOutputFormatter, and nkDebug::NunitOutputFormatter.

◆ formatTestLaunch()

virtual nkMemory::String nkDebug::OutputFormatter::formatTestLaunch ( const TestFunctionObserverInformation info)
virtual

Called when a TestClass' test function is starting.

Parameters
infoCurrent information about the run.
Returns
Returns a formatted string to use for logging.

Reimplemented in nkDebug::ConsoleOutputFormatter, and nkDebug::NunitOutputFormatter.

◆ formatTestBypass()

virtual nkMemory::String nkDebug::OutputFormatter::formatTestBypass ( const TestFunctionObserverInformation info)
virtual

Called when a TestClass' test function is bypassed.

Parameters
infoCurrent information about the run.
Returns
Returns a formatted string to use for logging.

Reimplemented in nkDebug::ConsoleOutputFormatter, and nkDebug::NunitOutputFormatter.

◆ formatTestSuccess()

virtual nkMemory::String nkDebug::OutputFormatter::formatTestSuccess ( const TestFunctionObserverInformation info)
virtual

Called when a TestClass' test function is succeeding.

Parameters
infoCurrent information about the run.
Returns
Returns a formatted string to use for logging.

Reimplemented in nkDebug::ConsoleOutputFormatter, and nkDebug::NunitOutputFormatter.

◆ formatTestFailure()

virtual nkMemory::String nkDebug::OutputFormatter::formatTestFailure ( const TestFunctionObserverInformation info)
virtual

Called when a TestClass' test function is failing.

Parameters
infoCurrent information about the run.
Returns
Returns a formatted string to use for logging.

Reimplemented in nkDebug::ConsoleOutputFormatter, and nkDebug::NunitOutputFormatter.


The documentation for this class was generated from the following file: