first dest handler unittests

- Add new mock class for event reporting proxies
- Add basic setup for unittesting the CFDP destination handler
This commit is contained in:
2022-09-05 11:37:41 +02:00
parent 0dd2b5ddd4
commit d2c4d546c3
6 changed files with 56 additions and 12 deletions

View File

@ -0,0 +1,21 @@
#ifndef FSFW_TESTS_EVENTREPORTPROXYMOCK_H
#define FSFW_TESTS_EVENTREPORTPROXYMOCK_H
#include <queue>
#include "fsfw/events/EventReportingProxyIF.h"
class EventReportingProxyMock : public EventReportingProxyIF {
public:
void forwardEvent(Event event, uint32_t parameter1, uint32_t parameter2) const override;
struct EventInfo {
EventInfo(Event event, uint32_t p1, uint32_t p2) : event(event), p1(p1), p2(p2) {}
Event event;
uint32_t p1;
uint32_t p2;
};
mutable std::queue<EventInfo> eventQueue;
};
#endif // FSFW_TESTS_EVENTREPORTPROXYMOCK_H