edbee - Qt Editor Library
Public Member Functions | List of all members
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. More...
 
virtual ~TestEngine ()
 destructs the testengine More...
 
virtual bool hasTest (TestCase *object)
 this method returns true if the given object is found More...
 
virtual void addTest (TestCase *object)
 this metohd adds a test More...
 
virtual int runAll ()
 This method runs all tests. More...
 
virtual int run (TestCase *object)
 This class executes all tests on the given test object (all private Slots) More...
 
virtual int run (const QString &name)
 This method runs the given test. More...
 
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 More...
 
virtual void endRun ()
 This method should be called when your done with running single test When using runAll you should not call this method. More...
 
virtual OutputHandleroutputHandler ()
 
virtual void setOutputHandler (OutputHandler *handler)
 
virtual TestCasecurrentTest ()
 This method returns the current test. More...
 
virtual const char * currentClassName ()
 This method returns the current class name. More...
 
virtual QString currentMethodName ()
 This method returns the current method name. More...
 
virtual void giveTestResult (TestResult *testResult)
 Appends the test result. More...
 
virtual QList< TestResult * > testResultList ()
 This method returns a list of test results. More...
 

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 ( 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

◆ run() [2/2]

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

This method runs the given test.

Parameters
namethe name of this test

◆ 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: