#include <TestCaseWithFactories.h>
Inheritance diagram for TestCaseWithFactories:
In the test set-up procedure, the dynamic factories for the telemetry packets, telecommands and manouvres are initialized and are loaded. The type of the items that are loaded are defined by the structure of the factories. Any change in the structure of the factories should be reflected by a corresponding change in this class. Test cases that need to access the dynamic factories should be constructed as subclasses of this class. <p/> The factory initialization and loading is only done the first time the test case is executed. <p/> This test case also defines a shut down procedure where all items in the factories have their status set to "item not in use". This ensures that all test cases that inherit from this class can start with all the items in the factories being available for their use.
Definition at line 45 of file TestCaseWithFactories.h.
Public Member Functions | |
TestCaseWithFactories (int testId, char *testName) | |
Set the identifier and the name of the test case. | |
virtual bool | setUpTestCase (void) |
Call the test setup service of the super class and then initialize the dynamic factories. | |
virtual bool | shutDownTestCase (void) |
All the items loaded in the factories in the setUpTestCase method are marked as "not in use". |
|
Set the identifier and the name of the test case.
Definition at line 67 of file TestCaseWithFactories.cpp. |
|
Call the test setup service of the super class and then initialize the dynamic factories. A pseudo-code implementation of this method is as follows: if ( !TestCaseWithEvtCheck::setUpTestCase() ) return false; else { if (first activation of this method) { retrieve the telemetry packet factory create telemetry packets for the telemetry packet factory configure telemetry packets load telemetry packets in the telemetry packet factory
retrieve the telecommand factory create telecommand components for the telecommand factory load telecommands in the telecommand factory
retrieve the manoeuvre factory create manoeuvre components for the manoeuvre factory load manoeuvres in the manoeuvre factory
return true; } }Note that the dynamic factories are implemented as singletons that are created and initialized by simply calling their getInstance method.
Reimplemented from TestCaseWithEvtCheck. Reimplemented in TestCasePUSFull. Definition at line 72 of file TestCaseWithFactories.cpp. |
|
All the items loaded in the factories in the
The change in the "in use" status is performed by calling their Reimplemented from TestCaseGenericSetUp. Reimplemented in TestCasePUSFull. Definition at line 185 of file TestCaseWithFactories.cpp. |