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:
ReportMock(const std::string & id)10     explicit ReportMock(const std::string& id)
11     {
12         using namespace testing;
13 
14         ON_CALL(*this, getId).WillByDefault([id] { return id; });
15         ON_CALL(*this, getPath).WillByDefault([id] { return "/" + id; });
16         EXPECT_CALL(*this, Die).Times(AnyNumber());
17     }
18 
~ReportMock()19     virtual ~ReportMock()
20     {
21         Die();
22     }
23 
24     MOCK_METHOD(std::string, getId, (), (override, const));
25     MOCK_METHOD(std::string, getPath, (), (override, const));
26 
27     MOCK_METHOD(void, Die, ());
28 };
29