fsfw/unittests/mocks/cfdp/UserMock.cpp

34 lines
1.3 KiB
C++
Raw Normal View History

#include "UserMock.h"
namespace cfdp {
cfdp::UserMock::UserMock(HasFileSystemIF& vfs) : UserBase(vfs) {}
void UserMock::transactionIndication(const TransactionId& id) {}
void UserMock::eofSentIndication(const TransactionId& id) {}
void UserMock::abandonedIndication(const TransactionId& id, cfdp::ConditionCode code,
2022-08-24 17:31:26 +02:00
uint64_t progress) {}
void UserMock::eofRecvIndication(const TransactionId& id) { eofsRevd.push(id); }
void UserMock::transactionFinishedIndication(const TransactionFinishedParams& finishedParams) {}
2022-09-06 13:16:00 +02:00
void UserMock::metadataRecvdIndication(const MetadataRecvdParams& params) {
MetadataRecvdParams copy = params;
metadataRecvd.push(copy);
}
void UserMock::fileSegmentRecvdIndication(const FileSegmentRecvdParams& params) {}
void UserMock::reportIndication(const TransactionId& id, StatusReportIF& report) {}
void UserMock::suspendedIndication(const TransactionId& id, ConditionCode code) {}
void UserMock::resumedIndication(const TransactionId& id, size_t progress) {}
2022-08-24 17:31:26 +02:00
void UserMock::faultIndication(const TransactionId& id, cfdp::ConditionCode code, size_t progress) {
}
2022-08-24 17:31:26 +02:00
2022-09-06 13:16:00 +02:00
void UserMock::reset() {
std::queue<TransactionId>().swap(eofsRevd);
std::queue<cfdp::MetadataRecvdParams>().swap(metadataRecvd);
2022-09-06 13:16:00 +02:00
}
2022-08-24 17:31:26 +02:00
} // namespace cfdp