Patrick Venture | ef3aead | 2018-09-12 08:53:29 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Patrick Venture | aceb4ba | 2018-09-27 14:50:37 -0700 | [diff] [blame] | 3 | #include <blobs-ipmid/blobs.hpp> |
Patrick Venture | ef3aead | 2018-09-12 08:53:29 -0700 | [diff] [blame] | 4 | |
| 5 | #include <gmock/gmock.h> |
| 6 | |
| 7 | namespace blobs |
| 8 | { |
| 9 | |
| 10 | class 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 Venture | 8bc1177 | 2019-06-04 07:20:24 -0700 | [diff] [blame] | 18 | MOCK_METHOD2(stat, bool(const std::string&, BlobMeta*)); |
Patrick Venture | ef3aead | 2018-09-12 08:53:29 -0700 | [diff] [blame] | 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 Venture | 5c4b17b | 2018-10-04 10:32:22 -0700 | [diff] [blame] | 22 | MOCK_METHOD3(writeMeta, |
| 23 | bool(uint16_t, uint32_t, const std::vector<uint8_t>&)); |
Patrick Venture | ef3aead | 2018-09-12 08:53:29 -0700 | [diff] [blame] | 24 | MOCK_METHOD2(commit, bool(uint16_t, const std::vector<uint8_t>&)); |
| 25 | MOCK_METHOD1(close, bool(uint16_t)); |
Patrick Venture | 8bc1177 | 2019-06-04 07:20:24 -0700 | [diff] [blame] | 26 | MOCK_METHOD2(stat, bool(uint16_t, BlobMeta*)); |
Patrick Venture | ef3aead | 2018-09-12 08:53:29 -0700 | [diff] [blame] | 27 | MOCK_METHOD1(expire, bool(uint16_t)); |
| 28 | }; |
| 29 | } // namespace blobs |