reworked test setup
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
36
unittest/testEnvironment.h
Normal file
36
unittest/testEnvironment.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef UNITTEST_TESTENVIRONMENT_H_
|
||||
#define UNITTEST_TESTENVIRONMENT_H_
|
||||
|
||||
#include "mocks/EventManagerMock.h"
|
||||
#include "mocks/HouseKeepingMock.h"
|
||||
|
||||
/*
|
||||
* This namespace sets up a general environment for unittests
|
||||
*
|
||||
* Only objects generally used in all unittest are created here. Objects needed for
|
||||
* individual tests are to be contstructed in the individual tests.
|
||||
*
|
||||
* The object manager can be initialized by the initialize() call
|
||||
*
|
||||
* It also caches pointers to generally useful objects so they do
|
||||
* not need to be gotten from the object manager each time
|
||||
*/
|
||||
namespace testEnvironment {
|
||||
|
||||
/*
|
||||
* Setup code goes here, called by main() befor any tests
|
||||
*/
|
||||
void setup();
|
||||
|
||||
/*
|
||||
* Initializes the object manager, to be called at the start of each test, after test specific
|
||||
* objects are constructed
|
||||
*
|
||||
* All objects defined in the factory method are created here
|
||||
*/
|
||||
void initialize();
|
||||
|
||||
extern EventManagerMock* eventManager;
|
||||
} // namespace testEnvironment
|
||||
|
||||
#endif /*UNITTEST_TESTENVIRONMENT_H_*/
|
Reference in New Issue
Block a user