blob: 3396048d00415bcb0c68f33d64a095332d59903b [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>&));
22 MOCK_METHOD2(commit, bool(uint16_t, const std::vector<uint8_t>&));
23 MOCK_METHOD1(close, bool(uint16_t));
24 MOCK_METHOD2(stat, bool(uint16_t, struct BlobMeta*));
25 MOCK_METHOD1(expire, bool(uint16_t));
26};
27} // namespace blobs