|
MoSync 3.2.1
|
A test case. More...
#include <MATest/Test.h>
Public Member Functions | |
| TestCase (const String &name) | |
| virtual | ~TestCase () |
| virtual void | open () |
| virtual void | close () |
| virtual void | start ()=0 |
| void | addTestListener (TestListener *testListener) |
| bool | assert (const String &assertionName, bool success) |
| const String & | getName () const |
| void | setSuite (TestSuite *suite) |
Protected Attributes | |
| TestSuite * | suite |
| String | name |
A test case.
Implement this class for each of your test cases. Use assert when testing assertions. Override open and close to initialize and deinitialize test case specific things. Override start for the tests.
Do not initialize any non-const variables in the constructor, as the test may be run more than once.
| MATest::TestCase::TestCase | ( | const String & | name | ) |
| virtual MATest::TestCase::~TestCase | ( | ) | [virtual] |
| virtual void MATest::TestCase::open | ( | ) | [virtual] |
| virtual void MATest::TestCase::close | ( | ) | [virtual] |
| virtual void MATest::TestCase::start | ( | ) | [pure virtual] |
| void MATest::TestCase::addTestListener | ( | TestListener * | testListener | ) |
| bool MATest::TestCase::assert | ( | const String & | assertionName, |
| bool | success | ||
| ) |
| const String& MATest::TestCase::getName | ( | ) | const |
| void MATest::TestCase::setSuite | ( | TestSuite * | suite | ) |
TestSuite* MATest::TestCase::suite [protected] |
String MATest::TestCase::name [protected] |