blob: 2a967acf6e51942a85117b0b241ac3a08a487b5a [file] [log] [blame]
Patrick Venturea78e39f2018-11-06 18:37:06 -08001#pragma once
2
3#include "image_handler.hpp"
4
5#include <gmock/gmock.h>
6
Patrick Venture1d5a31c2019-05-20 11:38:22 -07007namespace ipmi_flash
Patrick Venturea78e39f2018-11-06 18:37:06 -08008{
9
10class ImageHandlerMock : public ImageHandlerInterface
11{
12 public:
13 virtual ~ImageHandlerMock() = default;
Jason Ling56a22732020-10-23 19:53:17 -070014 MOCK_METHOD2(open, bool(const std::string&, std::ios_base::openmode));
Patrick Venture68bb1432018-11-09 20:08:48 -080015 MOCK_METHOD0(close, void());
Patrick Venture400c6362018-11-06 20:06:11 -080016 MOCK_METHOD2(write, bool(std::uint32_t, const std::vector<std::uint8_t>&));
Jason Ling56a22732020-10-23 19:53:17 -070017 MOCK_METHOD2(read, std::optional<std::vector<std::uint8_t>>(std::uint32_t,
18 std::uint32_t));
Patrick Venturecc7d1602018-11-15 13:58:33 -080019 MOCK_METHOD0(getSize, int());
Patrick Venturea78e39f2018-11-06 18:37:06 -080020};
21
Patrick Venture1d5a31c2019-05-20 11:38:22 -070022} // namespace ipmi_flash