blob: 494342154ea2a56026878510e0b2d7938041c890 [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
21 EXPECT_CALL(*this, getPath).Times(AnyNumber());
22 EXPECT_CALL(*this, getName).Times(AnyNumber());
23 EXPECT_CALL(*this, Die).Times(AnyNumber());
24 }
25
26 virtual ~ReportMock()
27 {
28 Die();
29 }
30
31 MOCK_METHOD(std::string, getName, (), (override, const));
32 MOCK_METHOD(std::string, getPath, (), (override, const));
33 MOCK_METHOD(void, Die, ());
34};