add new tests

This commit is contained in:
Robin Müller 2022-07-26 11:19:36 +02:00
parent f1c37203a4
commit 332e9dbfd5
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 19 additions and 1 deletions

View File

@ -3,7 +3,6 @@
#include "fsfw/storagemanager/LocalPool.h" #include "fsfw/storagemanager/LocalPool.h"
#include "fsfw/tmtcservices/TmSendHelper.h" #include "fsfw/tmtcservices/TmSendHelper.h"
#include "fsfw/tmtcservices/TmStoreHelper.h" #include "fsfw/tmtcservices/TmStoreHelper.h"
#include "fsfw/tmtcservices/tmHelpers.h"
#include "mocks/CdsShortTimestamperMock.h" #include "mocks/CdsShortTimestamperMock.h"
#include "mocks/InternalErrorReporterMock.h" #include "mocks/InternalErrorReporterMock.h"
#include "mocks/MessageQueueMock.h" #include "mocks/MessageQueueMock.h"

View File

@ -0,0 +1,19 @@
#include <catch2/catch_test_macros.hpp>
#include "fsfw/storagemanager/LocalPool.h"
#include "fsfw/tmtcservices/TmSendHelper.h"
#include "fsfw/tmtcservices/TmStoreHelper.h"
#include "mocks/CdsShortTimestamperMock.h"
TEST_CASE("TM Store And Send Helper", "[tm-store-send-helper]") {
auto timeStamper = CdsShortTimestamperMock();
LocalPool::LocalPoolConfig cfg = {{5, 32}, {2, 64}};
LocalPool pool(objects::NO_OBJECT, cfg);
auto storeHelper = TmStoreHelper(2, pool, timeStamper);
MessageQueueId_t destId = 1;
auto errReporter = InternalErrorReporterMock();
auto msgQueue = MessageQueueMock();
msgQueue.setDefaultDestination(destId);
TmSendHelper sendHelper(msgQueue, errReporter, destId);
}