blob: d67c457627045cd31d4b8434393053a86afd80ae [file] [log] [blame]
Patrick Venture98055432018-06-08 14:04:43 -07001#pragma once
2
Patrick Venture98055432018-06-08 14:04:43 -07003#include "interfaces.hpp"
4#include "sensors/sensor.hpp"
5
Patrick Ventureda4a5dd2018-08-31 09:42:48 -07006#include <gmock/gmock.h>
7
Patrick Venturea0764872020-08-08 07:48:43 -07008namespace pid_control
9{
10
Patrick Venture98055432018-06-08 14:04:43 -070011class SensorMock : public Sensor
12{
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070013 public:
14 virtual ~SensorMock() = default;
Patrick Venture98055432018-06-08 14:04:43 -070015
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070016 SensorMock(const std::string& name, int64_t timeout) : Sensor(name, timeout)
Patrick Venturea83a3ec2020-08-04 09:52:05 -070017 {}
Patrick Venture98055432018-06-08 14:04:43 -070018
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070019 MOCK_METHOD0(read, ReadReturn());
20 MOCK_METHOD1(write, void(double));
Patrick Venture98055432018-06-08 14:04:43 -070021};
Patrick Venturea0764872020-08-08 07:48:43 -070022
23} // namespace pid_control