blob: 845d7c1584bbfe6c482f89fbb863c658d1a7a598 [file] [log] [blame]
Patrick Venture00887592018-12-11 10:57:06 -08001#include "blob_interface.hpp"
2
Patrick Venture0533d0b2018-12-13 08:48:24 -08003#include <gmock/gmock.h>
4
Patrick Venture9b534f02018-12-13 16:10:02 -08005namespace host_tool
6{
7
Patrick Venture00887592018-12-11 10:57:06 -08008class BlobInterfaceMock : public BlobInterface
9{
10 public:
11 virtual ~BlobInterfaceMock() = default;
Patrick Venture77c59182019-01-17 14:53:31 -080012 MOCK_METHOD3(writeMeta, void(std::uint16_t, std::uint32_t,
13 const std::vector<std::uint8_t>&));
Patrick Venture0309f102019-01-15 13:41:05 -080014 MOCK_METHOD3(writeBytes, void(std::uint16_t, std::uint32_t,
15 const std::vector<std::uint8_t>&));
Patrick Venture00887592018-12-11 10:57:06 -080016 MOCK_METHOD0(getBlobList, std::vector<std::string>());
Patrick Venture0bf8bf02018-12-12 20:43:25 -080017 MOCK_METHOD1(getStat, StatResponse(const std::string&));
Patrick Venture0533d0b2018-12-13 08:48:24 -080018 MOCK_METHOD2(openBlob,
19 std::uint16_t(const std::string&,
20 blobs::FirmwareBlobHandler::UpdateFlags));
Patrick Venture9a5ce562018-12-14 18:56:04 -080021 MOCK_METHOD1(closeBlob, void(std::uint16_t));
Patrick Venture957f0862019-02-01 14:40:06 -080022 MOCK_METHOD3(readBytes,
23 std::vector<std::uint8_t>(std::uint16_t, std::uint32_t,
24 std::uint32_t));
Patrick Venture00887592018-12-11 10:57:06 -080025};
Patrick Venture9b534f02018-12-13 16:10:02 -080026
27} // namespace host_tool