blob: 758290cba98f847678529641a3b935f526b415d4 [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));
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020027 MOCK_METHOD(void, Die, ());
28};