blob: 268b681a8427fa32a0a879f84dec10ff60a5400e [file] [log] [blame]
Krzysztof Grobelnyc8e3a642020-10-23 12:29:16 +02001#pragma once
2
3#include "interfaces/metric.hpp"
4
5#include <gmock/gmock.h>
6
7class MetricMock : public interfaces::Metric
8{
9 public:
10 MetricMock()
11 {
12 using namespace testing;
13
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +000014 ON_CALL(*this, getReadings())
Krzysztof Grobelny80697712021-03-04 09:49:27 +000015 .WillByDefault(Return(std::vector<MetricValue>()));
Krzysztof Grobelnyc8e3a642020-10-23 12:29:16 +020016 }
17
Krzysztof Grobelny6ccfcbf2020-11-04 09:31:36 +010018 MOCK_METHOD(void, initialize, (), (override));
Lukasz Kazmierczak7e098e92021-09-16 15:59:56 +020019 MOCK_METHOD(void, deinitialize, (), (override));
Krzysztof Grobelny80697712021-03-04 09:49:27 +000020 MOCK_METHOD(std::vector<MetricValue>, getReadings, (), (const, override));
Krzysztof Grobelnyd2238192020-12-02 09:27:28 +000021 MOCK_METHOD(LabeledMetricParameters, dumpConfiguration, (),
22 (const, override));
Szymon Dompke3eb56862021-09-20 15:32:04 +020023
24 uint64_t sensorCount() const override
25 {
26 return getReadings().size();
27 }
Krzysztof Grobelnyc8e3a642020-10-23 12:29:16 +020028};