rili::test::Formater Class Referenceabstract
Inheritance diagram for rili::test::Formater:
[legend]

Public Member Functions

 Formater (std::ostream &logStream)
 
virtual void testDisabled (std::string const &fixture, std::string const &scenario) noexcept=0
 
virtual void testSkipped (std::string const &fixture, std::string const &scenario) noexcept=0
 
virtual void afterFailed (const std::string &reason) noexcept=0
 
virtual void beforeFailed (const std::string &reason) noexcept=0
 
virtual void createFailed (const std::string &reason) noexcept=0
 
virtual void endTest () noexcept=0
 
virtual void endTests () noexcept=0
 
virtual void runFailed (const std::string &reason) noexcept=0
 
virtual void startTest (std::string const &fixture, std::string const &scenario, std::string const &type) noexcept=0
 
virtual void startTests () noexcept=0
 
virtual void expectFailed (std::string const &file, std::string const &line, const std::string &content) noexcept=0
 
virtual void unexpectedCall (std::string const &file, std::string const &line, void const *objectId, const std::string &signature, const std::string &arguments) noexcept=0
 

Protected Member Functions

std::ostream & stream () noexcept
 

Detailed Description

Using Formater as base class you can implement your own tests results output format - you can use as reference rili::test::BasicFormater.

Constructor & Destructor Documentation

rili::test::Formater::Formater ( std::ostream &  logStream)
explicit

constructor needs stream which will be used to flust formated test results

Parameters
logStream- used to flush results

Member Function Documentation

virtual void rili::test::Formater::afterFailed ( const std::string &  reason)
pure virtualnoexcept

is called when detected exception during rili::test::TestBaseFixture::after()

Parameters
reason- reason of failure

Implemented in rili::test::BasicFormater.

virtual void rili::test::Formater::beforeFailed ( const std::string &  reason)
pure virtualnoexcept

is called when detected excaption during rili::test::TestBaseFixture::before()

Parameters
reason- reason of failure

Implemented in rili::test::BasicFormater.

virtual void rili::test::Formater::createFailed ( const std::string &  reason)
pure virtualnoexcept

is called when detected exception during rili::test::TestBaseFixture construction

Parameters
reason- reason of failure

Implemented in rili::test::BasicFormater.

virtual void rili::test::Formater::endTest ( )
pure virtualnoexcept

is called when single test ended

Implemented in rili::test::BasicFormater.

virtual void rili::test::Formater::endTests ( )
pure virtualnoexcept

is called when all tests ended, so no more tests will be run

Implemented in rili::test::BasicFormater.

virtual void rili::test::Formater::expectFailed ( std::string const &  file,
std::string const &  line,
const std::string &  content 
)
pure virtualnoexcept

is called on any expectation failure

Parameters
filecontain expectation file
linecontain expectation line
contentcontain expectation reason or description

Implemented in rili::test::BasicFormater.

virtual void rili::test::Formater::runFailed ( const std::string &  reason)
pure virtualnoexcept

is called when detected excption during rili::test::TestBaseFixture::run()

Parameters
reason- reason of failure

Implemented in rili::test::BasicFormater.

virtual void rili::test::Formater::startTest ( std::string const &  fixture,
std::string const &  scenario,
std::string const &  type 
)
pure virtualnoexcept

is called when single test exacution is started

Parameters
fixture- test fixture name
scenario- test scenario name
type- test scenario type name

Implemented in rili::test::BasicFormater.

virtual void rili::test::Formater::startTests ( )
pure virtualnoexcept

startTests called as first event, when staring tests execution

Implemented in rili::test::BasicFormater.

std::ostream& rili::test::Formater::stream ( )
protectednoexcept

can be used by Formater derived implementations to flush test results

Returns
stream
virtual void rili::test::Formater::testDisabled ( std::string const &  fixture,
std::string const &  scenario 
)
pure virtualnoexcept

is called when detected that test is disabled

Parameters
fixturetest fixture name
scenariotest scenario name

Implemented in rili::test::BasicFormater.

virtual void rili::test::Formater::testSkipped ( std::string const &  fixture,
std::string const &  scenario 
)
pure virtualnoexcept

is called when detected that test is skipped

Parameters
fixturetest fixture name
scenariotest scenario name

Implemented in rili::test::BasicFormater.

virtual void rili::test::Formater::unexpectedCall ( std::string const &  file,
std::string const &  line,
void const *  objectId,
const std::string &  signature,
const std::string &  arguments 
)
pure virtualnoexcept

is used when is detected unexpected call on mocked object

Parameters
filecontain file path where mock was created
linecontain line number where mock was created
objectIdpointer to object (it this)
signaturestringified signature of mocked function
argumentsarguments with which mocked method was called (if argument is converitable to string)

Implemented in rili::test::BasicFormater.


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