MQLUNIT
Public Member Functions | List of all members
MQLUNIT_TestSuite Class Reference

Runs a collection of test cases. More...

Inheritance diagram for MQLUNIT_TestSuite:
Inheritance graph
[legend]

Public Member Functions

 MQLUNIT_TestSuite ()
 Constructor : creates a test suite using a class name as a test suite name. More...
 
 MQLUNIT_TestSuite (const string name)
 Constructor : creates a test suite with a provided suite name. More...
 
virtual ~MQLUNIT_TestSuite ()
 Destructor. More...
 
virtual void addTest (MQLUNIT_Test *test)
 Add a test to this test suite. More...
 
virtual void run (MQLUNIT_TestResult *result, bool inherited=false)
 Runs the test suite. More...
 
- Public Member Functions inherited from MQLUNIT_Test
 MQLUNIT_Test ()
 Constructor : creates a test using a class name as a test name. More...
 
 MQLUNIT_Test (const string name)
 Constructor : creates a test with a provided test name. More...
 
virtual ~MQLUNIT_Test ()
 Destructor. More...
 
string getName ()
 Returns a name of a test. More...
 

Detailed Description

Runs a collection of test cases.

A MQLUNIT_TestSuite is a Composite of MQLUNIT_Test.

Example usage:

suite.addTest(new MyFirstTestCase());
suite.addTest(new MySecondTestCase());
suite.addTest(new MyThirdTestCase());
runner.run(&suite);
See also
MQLUNIT_Test
MQLUNIT_TestCase
MQLUNIT_TestResult

Constructor & Destructor Documentation

◆ MQLUNIT_TestSuite() [1/2]

MQLUNIT_TestSuite::MQLUNIT_TestSuite ( )
inline

Constructor : creates a test suite using a class name as a test suite name.

◆ MQLUNIT_TestSuite() [2/2]

MQLUNIT_TestSuite::MQLUNIT_TestSuite ( const string  name)
inline

Constructor : creates a test suite with a provided suite name.

Parameters
name: test suite name

◆ ~MQLUNIT_TestSuite()

virtual MQLUNIT_TestSuite::~MQLUNIT_TestSuite ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ addTest()

virtual void MQLUNIT_TestSuite::addTest ( MQLUNIT_Test test)
inlinevirtual

Add a test to this test suite.

Parameters
test: a test to add to this test suite

◆ run()

void MQLUNIT_TestSuite::run ( MQLUNIT_TestResult result,
bool  inherited = false 
)
virtual

Runs the test suite.

Parameters
result: collects the results of executing a test suite
inherited: set to true to tell the test it has been inherited from and is run by a child test
See also
MQLUNIT_TestResult

Implements MQLUNIT_Test.


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

Copyright © 2017 Eneset Group Trust