1 #pragma once
2 
3 #include "interfaces/metric.hpp"
4 
5 #include <gmock/gmock.h>
6 
7 class MetricMock : public interfaces::Metric
8 {
9   public:
10     MetricMock()
11     {
12         using namespace testing;
13 
14         ON_CALL(*this, getReadings())
15             .WillByDefault(Return(std::vector<MetricValue>()));
16     }
17 
18     MOCK_METHOD(void, initialize, (), (override));
19     MOCK_METHOD(void, deinitialize, (), (override));
20     MOCK_METHOD(std::vector<MetricValue>, getReadings, (), (const, override));
21     MOCK_METHOD(LabeledMetricParameters, dumpConfiguration, (),
22                 (const, override));
23 
24     uint64_t sensorCount() const override
25     {
26         return getReadings().size();
27     }
28 };
29