Patrick Venture | 9805543 | 2018-06-08 14:04:43 -0700 | [diff] [blame] | 1 | #pragma once |
2 | |||||
Patrick Venture | 9805543 | 2018-06-08 14:04:43 -0700 | [diff] [blame] | 3 | #include "interfaces.hpp" |
4 | #include "sensors/sensor.hpp" | ||||
5 | |||||
Patrick Venture | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 6 | #include <gmock/gmock.h> |
7 | |||||
Patrick Venture | a076487 | 2020-08-08 07:48:43 -0700 | [diff] [blame] | 8 | namespace pid_control |
9 | { | ||||
10 | |||||
Patrick Venture | 9805543 | 2018-06-08 14:04:43 -0700 | [diff] [blame] | 11 | class SensorMock : public Sensor |
12 | { | ||||
Patrick Venture | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 13 | public: |
14 | virtual ~SensorMock() = default; | ||||
Patrick Venture | 9805543 | 2018-06-08 14:04:43 -0700 | [diff] [blame] | 15 | |
Patrick Venture | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 16 | SensorMock(const std::string& name, int64_t timeout) : Sensor(name, timeout) |
Patrick Venture | a83a3ec | 2020-08-04 09:52:05 -0700 | [diff] [blame] | 17 | {} |
Patrick Venture | 9805543 | 2018-06-08 14:04:43 -0700 | [diff] [blame] | 18 | |
Patrick Venture | da4a5dd | 2018-08-31 09:42:48 -0700 | [diff] [blame] | 19 | MOCK_METHOD0(read, ReadReturn()); |
20 | MOCK_METHOD1(write, void(double)); | ||||
Josh Lehan | a4146eb | 2020-10-01 11:49:09 -0700 | [diff] [blame] | 21 | MOCK_METHOD3(write, void(double, bool, int64_t*)); |
Patrick Venture | 9805543 | 2018-06-08 14:04:43 -0700 | [diff] [blame] | 22 | }; |
Patrick Venture | a076487 | 2020-08-08 07:48:43 -0700 | [diff] [blame] | 23 | |
24 | } // namespace pid_control |