1
0
forked from fsfw/fsfw

added some more basic tests

This commit is contained in:
2022-08-17 17:09:39 +02:00
parent 0bb82e0da2
commit 6930656d4e
5 changed files with 26 additions and 7 deletions

View File

@ -1,6 +1,15 @@
#include "RemoteConfigTableMock.h"
bool cfdp::RemoteConfigTableMock::getRemoteCfg(cfdp::EntityId remoteId,
cfdp::RemoteEntityCfg *cfg) {
return false;
void cfdp::RemoteConfigTableMock::addRemoteConfig(const cfdp::RemoteEntityCfg& cfg) {
remoteCfgTable.emplace(cfg.remoteId, cfg);
}
bool cfdp::RemoteConfigTableMock::getRemoteCfg(const cfdp::EntityId& remoteId,
cfdp::RemoteEntityCfg** cfg) {
auto iter = remoteCfgTable.find(remoteId);
if (iter == remoteCfgTable.end()) {
return false;
}
*cfg = &iter->second;
return true;
}