edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
edbee::test::TestEngine Class Reference

This is the main test engine. More...

#include <test.h>

+ Inheritance diagram for edbee::test::TestEngine:
+ Collaboration diagram for edbee::test::TestEngine:

Public Member Functions

 TestEngine ()
 The test engine constructor.
 
virtual ~TestEngine ()
 destructs the testengine
 
virtual bool hasTest (TestCase *object)
 this method returns true if the given object is found
 
virtual void addTest (TestCase *object)
 this metohd adds a test
 
virtual int runAll ()
 This method runs all tests.
 
virtual int run (TestCase *object)
 This class executes all tests on the given test object (all private Slots)
 
virtual int run (const QString &name)
 This method runs the given test.
 
virtual void startRun ()
 should be called before the first run when manually running single unit tests When using runAll you should not call this method
 
virtual void endRun ()
 This method should be called when your done with running single test When using runAll you should not call this method.
 
virtual OutputHandleroutputHandler ()
 
virtual void setOutputHandler (OutputHandler *handler)
 
virtual TestCasecurrentTest ()
 This method returns the current test.
 
virtual const char * currentClassName ()
 This method returns the current class name.
 
virtual QString currentMethodName ()
 This method returns the current method name.
 
virtual void giveTestResult (TestResult *testResult)
 Appends the test result.
 
virtual QList< TestResult * > testResultList ()
 This method returns a list of test results.
 

Detailed Description

This is the main test engine.

Constructor & Destructor Documentation

◆ TestEngine()

edbee::test::TestEngine::TestEngine ( )
explicit

The test engine constructor.

◆ ~TestEngine()

edbee::test::TestEngine::~TestEngine ( )
virtual

destructs the testengine

Member Function Documentation

◆ addTest()

void edbee::test::TestEngine::addTest ( TestCase * object)
virtual

this metohd adds a test

Parameters
objectthe testcase to add

◆ currentClassName()

virtual const char * edbee::test::TestEngine::currentClassName ( )
inlinevirtual

This method returns the current class name.

◆ currentMethodName()

virtual QString edbee::test::TestEngine::currentMethodName ( )
inlinevirtual

This method returns the current method name.

◆ currentTest()

virtual TestCase * edbee::test::TestEngine::currentTest ( )
inlinevirtual

This method returns the current test.

◆ endRun()

void edbee::test::TestEngine::endRun ( )
virtual

This method should be called when your done with running single test When using runAll you should not call this method.

◆ giveTestResult()

void edbee::test::TestEngine::giveTestResult ( TestResult * testResult)
virtual

Appends the test result.

Parameters
testResultthe result of the tests to add to the list of results

◆ hasTest()

bool edbee::test::TestEngine::hasTest ( TestCase * object)
virtual

this method returns true if the given object is found

Parameters
objectthe testcase object

◆ outputHandler()

virtual OutputHandler * edbee::test::TestEngine::outputHandler ( )
inlinevirtual

◆ run() [1/2]

int edbee::test::TestEngine::run ( const QString & name)
virtual

This method runs the given test.

Parameters
namethe name of this test

◆ run() [2/2]

int edbee::test::TestEngine::run ( TestCase * test)
virtual

This class executes all tests on the given test object (all private Slots)

Parameters
objecthte object that needs to be run
Returns
at the moment 0

◆ runAll()

int edbee::test::TestEngine::runAll ( )
virtual

This method runs all tests.

Returns
at the moment 0

◆ setOutputHandler()

virtual void edbee::test::TestEngine::setOutputHandler ( OutputHandler * handler)
inlinevirtual

◆ startRun()

void edbee::test::TestEngine::startRun ( )
virtual

should be called before the first run when manually running single unit tests When using runAll you should not call this method

◆ testResultList()

virtual QList< TestResult * > edbee::test::TestEngine::testResultList ( )
inlinevirtual

This method returns a list of test results.


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