Patrick Venture | a78e39f | 2018-11-06 18:37:06 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "image_handler.hpp" |
| 4 | |
| 5 | #include <gmock/gmock.h> |
| 6 | |
Patrick Venture | 1d5a31c | 2019-05-20 11:38:22 -0700 | [diff] [blame] | 7 | namespace ipmi_flash |
Patrick Venture | a78e39f | 2018-11-06 18:37:06 -0800 | [diff] [blame] | 8 | { |
| 9 | |
| 10 | class ImageHandlerMock : public ImageHandlerInterface |
| 11 | { |
| 12 | public: |
| 13 | virtual ~ImageHandlerMock() = default; |
Jason Ling | 56a2273 | 2020-10-23 19:53:17 -0700 | [diff] [blame] | 14 | MOCK_METHOD2(open, bool(const std::string&, std::ios_base::openmode)); |
Patrick Venture | 68bb143 | 2018-11-09 20:08:48 -0800 | [diff] [blame] | 15 | MOCK_METHOD0(close, void()); |
Patrick Venture | 400c636 | 2018-11-06 20:06:11 -0800 | [diff] [blame] | 16 | MOCK_METHOD2(write, bool(std::uint32_t, const std::vector<std::uint8_t>&)); |
Jason Ling | 56a2273 | 2020-10-23 19:53:17 -0700 | [diff] [blame] | 17 | MOCK_METHOD2(read, std::optional<std::vector<std::uint8_t>>(std::uint32_t, |
| 18 | std::uint32_t)); |
Patrick Venture | cc7d160 | 2018-11-15 13:58:33 -0800 | [diff] [blame] | 19 | MOCK_METHOD0(getSize, int()); |
Patrick Venture | a78e39f | 2018-11-06 18:37:06 -0800 | [diff] [blame] | 20 | }; |
| 21 | |
Patrick Venture | 1d5a31c | 2019-05-20 11:38:22 -0700 | [diff] [blame] | 22 | } // namespace ipmi_flash |