blob: 1de68b66d4ac7a63a2bf04e065f14e087fab64bb [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));
Josh Lehana4146eb2020-10-01 11:49:09 -070021 MOCK_METHOD3(write, void(double, bool, int64_t*));
Patrick Venture98055432018-06-08 14:04:43 -070022};
Patrick Venturea0764872020-08-08 07:48:43 -070023
24} // namespace pid_control