blob: 7ec7d1556a954e00404101626221fda811f4b0d9 [file] [log] [blame]
Patrick Ventureef3aead2018-09-12 08:53:29 -07001#pragma once
2
Patrick Ventureaceb4ba2018-09-27 14:50:37 -07003#include <blobs-ipmid/blobs.hpp>
Patrick Ventureef3aead2018-09-12 08:53:29 -07004
5#include <gmock/gmock.h>
6
7namespace blobs
8{
9
10class BlobMock : public GenericBlobInterface
11{
12 public:
13 virtual ~BlobMock() = default;
14
15 MOCK_METHOD1(canHandleBlob, bool(const std::string&));
16 MOCK_METHOD0(getBlobIds, std::vector<std::string>());
17 MOCK_METHOD1(deleteBlob, bool(const std::string&));
Patrick Venture8bc11772019-06-04 07:20:24 -070018 MOCK_METHOD2(stat, bool(const std::string&, BlobMeta*));
Patrick Ventureef3aead2018-09-12 08:53:29 -070019 MOCK_METHOD3(open, bool(uint16_t, uint16_t, const std::string&));
20 MOCK_METHOD3(read, std::vector<uint8_t>(uint16_t, uint32_t, uint32_t));
21 MOCK_METHOD3(write, bool(uint16_t, uint32_t, const std::vector<uint8_t>&));
Patrick Venture5c4b17b2018-10-04 10:32:22 -070022 MOCK_METHOD3(writeMeta,
23 bool(uint16_t, uint32_t, const std::vector<uint8_t>&));
Patrick Ventureef3aead2018-09-12 08:53:29 -070024 MOCK_METHOD2(commit, bool(uint16_t, const std::vector<uint8_t>&));
25 MOCK_METHOD1(close, bool(uint16_t));
Patrick Venture8bc11772019-06-04 07:20:24 -070026 MOCK_METHOD2(stat, bool(uint16_t, BlobMeta*));
Patrick Ventureef3aead2018-09-12 08:53:29 -070027 MOCK_METHOD1(expire, bool(uint16_t));
28};
29} // namespace blobs