SASSY
0.0
Software Architecture Support System
|
Responsible for handling asynchronous tests. More...
#include <cfi/testmgr.h>
Public Member Functions | |
AsyncTestCase (csr name) | |
Constructor. More... | |
Public Member Functions inherited from SASSY::cdi::AbstractTestCase | |
AbstractTestCase (csr nm) | |
Constructor. More... | |
virtual | ~AbstractTestCase () |
Destructor. More... | |
virtual bool | operator() (ScenarioResults *) |
Execute the tests. More... | |
Protected Member Functions | |
virtual void | initTest ()=0 |
Initiate the test case. More... | |
virtual void | handleEvent (TestEvent *ev)=0 |
Handle the events. More... | |
virtual void | timedOut ()=0 |
Handle time out. More... | |
Protected Member Functions inherited from SASSY::cdi::AbstractTestCase | |
bool | test (bool cond, csr testMsg, bool expected=false) |
Perform or record a test. More... | |
Protected Attributes | |
bool | done |
This should be set by the handleEvent function. | |
std::chrono::steady_clock::time_point | startTime |
The time when the test is started. | |
std::chrono::steady_clock::duration | timeOut |
The time to wait. The default is 10 seconds. | |
Protected Attributes inherited from SASSY::cdi::AbstractTestCase | |
std::string | name |
The name of the test case. | |
ScenarioResults * | scenario |
Results for the scenario are placed in here. | |
Additional Inherited Members | |
Static Public Attributes inherited from SASSY::cdi::AbstractTestCase | |
static const bool | EXPECTED = true |
Value for expected parameter of test() | |
Responsible for handling asynchronous tests.
AsyncTestCase::AsyncTestCase | ( | csr | name | ) |
Constructor.
name | The name of the test case. |
|
protectedpure virtual |
Handle the events.
When the object under test gets its call back it will queue an event which is passed to this function. Set done to true when the last expected event arrives.
ev | The test event. |
|
protectedpure virtual |
Initiate the test case.
The derived class should use this to start the test function. It should return immediately the test has been started.
|
protectedpure virtual |
Handle time out.
This gets called if the events don't arrive in time.