continue CFDP distrib unittests
This commit is contained in:
parent
c832bffdb0
commit
1c0b778848
@ -14,8 +14,8 @@ TEST_CASE("CFDP Distributor", "[cfdp][distributor]") {
|
|||||||
auto distributor = CfdpDistributor(distribCfg);
|
auto distributor = CfdpDistributor(distribCfg);
|
||||||
auto obswEntityId = cfdp::EntityId(UnsignedByteField<uint16_t>(2));
|
auto obswEntityId = cfdp::EntityId(UnsignedByteField<uint16_t>(2));
|
||||||
auto groundEntityId = cfdp::EntityId(UnsignedByteField<uint16_t>(1));
|
auto groundEntityId = cfdp::EntityId(UnsignedByteField<uint16_t>(1));
|
||||||
MessageQueueId_t acceptorQueueId = 3;
|
MessageQueueId_t receiverQueueId = 3;
|
||||||
auto tcAcceptor = AcceptsTcMock("TC Acceptor", 0, acceptorQueueId);
|
auto tcAcceptor = AcceptsTcMock("CFDP Receiver", 0, receiverQueueId);
|
||||||
cfdp::FileSize fileSize(12);
|
cfdp::FileSize fileSize(12);
|
||||||
const cfdp::EntityId& sourceId(groundEntityId);
|
const cfdp::EntityId& sourceId(groundEntityId);
|
||||||
const cfdp::EntityId& destId(obswEntityId);
|
const cfdp::EntityId& destId(obswEntityId);
|
||||||
@ -48,5 +48,12 @@ TEST_CASE("CFDP Distributor", "[cfdp][distributor]") {
|
|||||||
TmTcMessage msg(storeId);
|
TmTcMessage msg(storeId);
|
||||||
queue.addReceivedMessage(msg);
|
queue.addReceivedMessage(msg);
|
||||||
CHECK(distributor.performOperation(0) == result::OK);
|
CHECK(distributor.performOperation(0) == result::OK);
|
||||||
|
CHECK(queue.wasMessageSent());
|
||||||
|
CHECK(queue.numberOfSentMessages() == 1);
|
||||||
|
// The packet is forwarded, with no need to delete the data
|
||||||
|
CHECK(pool.hasDataAtId(storeId));
|
||||||
|
TmTcMessage sentMsg;
|
||||||
|
CHECK(queue.getNextSentMessage(receiverQueueId, sentMsg) == result::OK);
|
||||||
|
CHECK(sentMsg.getStorageId() == storeId);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user