blob: 6ececfcfbf84cab2c28ae6640c46cc5f3519e346 [file] [log] [blame]
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +02001#pragma once
2
3#include "interfaces/report.hpp"
4
5#include <gmock/gmock.h>
6
7class ReportMock : public interfaces::Report
8{
9 public:
Krzysztof Grobelnyfbeb5bf2022-01-03 09:41:29 +010010 explicit ReportMock(const std::string& id)
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020011 {
12 using namespace testing;
13
Krzysztof Grobelnyb8cc78d2021-11-29 15:54:53 +010014 ON_CALL(*this, getId).WillByDefault([id] { return id; });
15 ON_CALL(*this, getPath).WillByDefault([id] { return "/" + id; });
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020016 EXPECT_CALL(*this, Die).Times(AnyNumber());
17 }
18
19 virtual ~ReportMock()
20 {
21 Die();
22 }
23
Krzysztof Grobelnyb8cc78d2021-11-29 15:54:53 +010024 MOCK_METHOD(std::string, getId, (), (override, const));
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020025 MOCK_METHOD(std::string, getPath, (), (override, const));
Wludzik, Jozefd960e1f2021-01-08 09:25:59 +010026 MOCK_METHOD(void, updateReadings, (), (override));
Szymon Dompkeb4ef22e2022-02-07 15:15:12 +010027 MOCK_METHOD(void, updateTriggerIds,
28 (const std::string& triggerId, TriggerIdUpdate updateType),
29 (override));
30
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020031 MOCK_METHOD(void, Die, ());
32};