blob: 2f6ffac653d74e1c3ad480b2733ede37cfc3fcec [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:
10 ReportMock(std::string reportName)
11 {
12 using namespace testing;
13
14 ON_CALL(*this, getName).WillByDefault([reportName] {
15 return reportName;
16 });
17 ON_CALL(*this, getPath).WillByDefault([reportName] {
18 return "/" + reportName;
19 });
20
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020021 EXPECT_CALL(*this, Die).Times(AnyNumber());
22 }
23
24 virtual ~ReportMock()
25 {
26 Die();
27 }
28
29 MOCK_METHOD(std::string, getName, (), (override, const));
30 MOCK_METHOD(std::string, getPath, (), (override, const));
31 MOCK_METHOD(void, Die, ());
32};