blob: 8d84dbe831aafae8df4e3eb6cdf2bf5230d48a0a [file] [log] [blame]
#pragma once
#include "image_handler.hpp"
#include <memory>
#include <gmock/gmock.h>
namespace ipmi_flash
{
class ImageHandlerMock : public ImageHandlerInterface
{
public:
virtual ~ImageHandlerMock() = default;
MOCK_METHOD(bool, open, (const std::string&, std::ios_base::openmode),
(override));
MOCK_METHOD(void, close, (), (override));
MOCK_METHOD(bool, write, (std::uint32_t, const std::vector<std::uint8_t>&),
(override));
MOCK_METHOD(std::optional<std::vector<std::uint8_t>>, read,
(std::uint32_t, std::uint32_t), (override));
MOCK_METHOD(int, getSize, (), (override));
};
std::unique_ptr<ImageHandlerMock> CreateImageMock();
} // namespace ipmi_flash