blob: c7c900f0d7c7c45f669076c03fe94187defa49bc [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));
Szymon Dompkeb4ef22e2022-02-07 15:15:12 +010026
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020027 MOCK_METHOD(void, Die, ());
28};