blob: 726d53c726f06a784bf076ad3175da771e1dd6f0 [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:
Wludzik, Jozef76833cb2020-12-21 14:42:41 +010010 ReportMock(std::string name)
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020011 {
12 using namespace testing;
13
Wludzik, Jozef76833cb2020-12-21 14:42:41 +010014 ON_CALL(*this, getName).WillByDefault([name] { return name; });
15 ON_CALL(*this, getPath).WillByDefault([name] { return "/" + name; });
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020016 EXPECT_CALL(*this, Die).Times(AnyNumber());
17 }
18
19 virtual ~ReportMock()
20 {
21 Die();
22 }
23
24 MOCK_METHOD(std::string, getName, (), (override, const));
25 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};