1*b3e03d2dSMichal Orzel #pragma once
2*b3e03d2dSMichal Orzel 
3*b3e03d2dSMichal Orzel #include "types/readings.hpp"
4*b3e03d2dSMichal Orzel #include "types/report_action.hpp"
5*b3e03d2dSMichal Orzel 
6*b3e03d2dSMichal Orzel #include <ostream>
7*b3e03d2dSMichal Orzel 
8*b3e03d2dSMichal Orzel #include <gmock/gmock.h>
9*b3e03d2dSMichal Orzel 
10*b3e03d2dSMichal Orzel template <class Param>
11*b3e03d2dSMichal Orzel void PrintTo(const std::vector<Param>& vec, std::ostream* os);
12*b3e03d2dSMichal Orzel 
PrintTo(const ReadingData & data,std::ostream * os)13*b3e03d2dSMichal Orzel inline void PrintTo(const ReadingData& data, std::ostream* os)
14*b3e03d2dSMichal Orzel {
15*b3e03d2dSMichal Orzel     const auto& [id, value, timestamp] = data;
16*b3e03d2dSMichal Orzel     *os << "( " << id << ", " << std::to_string(value) << ", "
17*b3e03d2dSMichal Orzel         << std::to_string(timestamp) << " )";
18*b3e03d2dSMichal Orzel }
19*b3e03d2dSMichal Orzel 
PrintTo(const Readings & readings,std::ostream * os)20*b3e03d2dSMichal Orzel inline void PrintTo(const Readings& readings, std::ostream* os)
21*b3e03d2dSMichal Orzel {
22*b3e03d2dSMichal Orzel     const auto& [timestamp, readingDataVec] = readings;
23*b3e03d2dSMichal Orzel     *os << "( " << std::to_string(timestamp) << ", ";
24*b3e03d2dSMichal Orzel     PrintTo(readingDataVec, os);
25*b3e03d2dSMichal Orzel     *os << " )";
26*b3e03d2dSMichal Orzel }
27*b3e03d2dSMichal Orzel 
PrintTo(const ReportAction & action,std::ostream * os)28*b3e03d2dSMichal Orzel inline void PrintTo(const ReportAction& action, std::ostream* os)
29*b3e03d2dSMichal Orzel {
30*b3e03d2dSMichal Orzel     *os << utils::enumToString(action);
31*b3e03d2dSMichal Orzel }
32