blob: 24cc23ec619692c0c822a246758d757438db9df5 [file] [log] [blame]
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +02001#pragma once
2
3#include "interfaces/report_factory.hpp"
4#include "mocks/report_mock.hpp"
5
6#include <gmock/gmock.h>
7
8class ReportFactoryMock : public interfaces::ReportFactory
9{
10 public:
11 ReportFactoryMock()
12 {
13 using namespace testing;
14
15 ON_CALL(*this, make)
16 .WillByDefault(WithArgs<0>(Invoke([](const std::string& name) {
17 return std::make_unique<NiceMock<ReportMock>>(name);
18 })));
19 }
20
21 MOCK_METHOD(std::unique_ptr<interfaces::Report>, make,
22 (const std::string& name, const std::string& reportingType,
23 bool emitsReadingsSignal, bool logToMetricReportsCollection,
24 std::chrono::milliseconds period,
25 const ReadingParameters& metricParams,
26 interfaces::ReportManager& reportManager),
27 (const, override));
28};