added EventManagerMock, to be extended and moved into fsfw some day
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:
@ -1,11 +1,37 @@
|
||||
#include <fsfw/events/EventManager.h>
|
||||
#include <fsfw/health/HealthTable.h>
|
||||
#include <fsfw/housekeeping/AcceptsHkPacketsIF.h>
|
||||
#include <fsfw/internalerror/InternalErrorReporter.h>
|
||||
#include <fsfw/objectmanager/ObjectManager.h>
|
||||
#include <fsfw/storagemanager/PoolManager.h>
|
||||
#include <fsfw/timemanager/TimeStamper.h>
|
||||
|
||||
#include <catch2/catch_session.hpp>
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
#include "mocks/EventManagerMock.h"
|
||||
#include "mocks/HouseKeepingMock.h"
|
||||
|
||||
// Catch internal function call
|
||||
int result = Catch::Session().run(argc, argv);
|
||||
void factory(void* args) {
|
||||
new HouseKeepingMock();
|
||||
new EventManagerMock();
|
||||
new HealthTable(objects::HEALTH_TABLE);
|
||||
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);
|
||||
new TimeStamper(objects::TIME_STAMPER);
|
||||
|
||||
// global clean-up
|
||||
return result;
|
||||
{
|
||||
PoolManager::LocalPoolConfig poolCfg = {{300, 16}, {200, 32}, {150, 64}, {150, 128},
|
||||
{100, 256}, {50, 512}, {50, 1024}, {10, 2048}};
|
||||
new PoolManager(objects::IPC_STORE, poolCfg);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
ObjectManager::instance()->setObjectFactoryFunction(factory, nullptr);
|
||||
ObjectManager::instance()->initialize();
|
||||
|
||||
// Catch internal function call
|
||||
int result = Catch::Session().run(argc, argv);
|
||||
|
||||
// global clean-up
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user