blob: b70d3d1da94c81800b364656169742e59d6fc42e [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&));
18 MOCK_METHOD2(stat, bool(const std::string&, struct BlobMeta*));
19 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));
26 MOCK_METHOD2(stat, bool(uint16_t, struct BlobMeta*));
27 MOCK_METHOD1(expire, bool(uint16_t));
28};
29} // namespace blobs