Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "interfaces/report.hpp" |
| 4 | |
| 5 | #include <gmock/gmock.h> |
| 6 | |
| 7 | class ReportMock : public interfaces::Report |
| 8 | { |
| 9 | public: |
Krzysztof Grobelny | fbeb5bf | 2022-01-03 09:41:29 +0100 | [diff] [blame] | 10 | explicit ReportMock(const std::string& id) |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 11 | { |
| 12 | using namespace testing; |
| 13 | |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 14 | ON_CALL(*this, getId).WillByDefault([id] { return id; }); |
| 15 | ON_CALL(*this, getPath).WillByDefault([id] { return "/" + id; }); |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 16 | EXPECT_CALL(*this, Die).Times(AnyNumber()); |
| 17 | } |
| 18 | |
| 19 | virtual ~ReportMock() |
| 20 | { |
| 21 | Die(); |
| 22 | } |
| 23 | |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 24 | MOCK_METHOD(std::string, getId, (), (override, const)); |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 25 | MOCK_METHOD(std::string, getPath, (), (override, const)); |
Szymon Dompke | b4ef22e | 2022-02-07 15:15:12 +0100 | [diff] [blame] | 26 | |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 27 | MOCK_METHOD(void, Die, ()); |
| 28 | }; |