1 #pragma once 2 3 #include "pid/zone_interface.hpp" 4 5 #include <string> 6 7 #include <gmock/gmock.h> 8 9 namespace pid_control 10 { 11 12 class ZoneMock : public ZoneInterface 13 { 14 public: 15 virtual ~ZoneMock() = default; 16 17 MOCK_METHOD0(updateFanTelemetry, void()); 18 MOCK_METHOD0(updateSensors, void()); 19 MOCK_METHOD0(initializeCache, void()); 20 MOCK_METHOD1(getCachedValue, double(const std::string&)); 21 22 // Compatibility interface for getCachedValues 23 ValueCacheEntry getCachedValues(const std::string& s) 24 { 25 auto v = getCachedValue(s); 26 return ValueCacheEntry(v, v); 27 } 28 29 MOCK_CONST_METHOD0(getRedundantWrite, bool(void)); 30 MOCK_METHOD2(addSetPoint, void(double, const std::string&)); 31 MOCK_METHOD2(setOutputCache, 32 void(std::string_view name, const ValueCacheEntry& values)); 33 MOCK_METHOD0(clearSetPoints, void()); 34 MOCK_METHOD1(addRPMCeiling, void(double)); 35 MOCK_METHOD0(clearRPMCeilings, void()); 36 MOCK_METHOD0(determineMaxSetPointRequest, void()); 37 MOCK_CONST_METHOD0(getMaxSetPointRequest, double()); 38 39 MOCK_METHOD0(processFans, void()); 40 MOCK_METHOD0(processThermals, void()); 41 42 MOCK_CONST_METHOD0(getManualMode, bool()); 43 MOCK_CONST_METHOD0(getFailSafeMode, bool()); 44 MOCK_CONST_METHOD0(getFailSafePercent, double()); 45 MOCK_CONST_METHOD0(getZoneID, int64_t()); 46 47 MOCK_CONST_METHOD0(getCycleIntervalTime, uint64_t()); 48 MOCK_CONST_METHOD0(getUpdateThermalsCycle, uint64_t()); 49 50 MOCK_METHOD1(getSensor, Sensor*(const std::string&)); 51 52 MOCK_METHOD0(initializeLog, void()); 53 MOCK_METHOD1(writeLog, void(const std::string&)); 54 }; 55 56 } // namespace pid_control 57