looking good
This commit is contained in:
parent
8f5a8b13d3
commit
e8bf8b9575
@ -4,6 +4,7 @@
|
||||
#include "fsfw/cfdp/handler/ReservedMessageParser.h"
|
||||
#include "fsfw/cfdp/tlv/Lv.h"
|
||||
#include "fsfw/cfdp/tlv/ReservedMessageCreator.h"
|
||||
#include "fsfw/cfdp/CfdpMessage.h"
|
||||
#include "fsfw/cfdp/tlv/StringLv.h"
|
||||
#include "fsfw/globalfunctions/arrayprinter.h"
|
||||
#include "mocks/MessageQueueMock.h"
|
||||
@ -16,7 +17,7 @@ TEST_CASE("Reserved Message Parser", "[cfdp]") {
|
||||
std::string srcFileName = "hello.txt";
|
||||
std::string destFileName = "hello2.txt";
|
||||
MessageQueueId_t destQueueId = 2;
|
||||
MessageQueueMock msgQueue(destQueueId);
|
||||
MessageQueueMock msgQueue(1);
|
||||
LocalPool::LocalPoolConfig storeCfg = {{10, 32}, {10, 64}, {10, 128}, {10, 1024}};
|
||||
StorageManagerMock ipcStore(0, storeCfg);
|
||||
std::array<uint8_t, 128> buffer{};
|
||||
@ -41,4 +42,13 @@ TEST_CASE("Reserved Message Parser", "[cfdp]") {
|
||||
|
||||
ReservedMessageParser parser(ipcStore, msgQueue, destQueueId);
|
||||
CHECK(parser.parse(buffer.data(), serLen) == OK);
|
||||
CommandMessage msg;
|
||||
CHECK(msgQueue.wasMessageSent());
|
||||
CHECK(msgQueue.numberOfSentMessages() == 1);
|
||||
CHECK(msgQueue.getNextSentMessage(destQueueId, msg) == OK);
|
||||
store_address_t storeId = CfdpMessage::getStoreId(&msg);
|
||||
const uint8_t* data;
|
||||
size_t packetLen;
|
||||
ipcStore.getData(storeId, &data, &packetLen);
|
||||
CHECK(packetLen > 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user