diff options
author | Patrick Venture <venture@google.com> | 2018-10-03 14:01:35 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-10-04 13:47:24 +0000 |
commit | 7210b3109d3c93dd95eec0f74ab0635cba55fe2b (patch) | |
tree | e2c8aada58967873e15e00fe2ecbe2042d08927f /blobs-ipmid/test/manager_mock.hpp | |
parent | 5100a386404edfa517186c66aa90abbb6658bda7 (diff) | |
download | phosphor-ipmi-blobs-7210b3109d3c93dd95eec0f74ab0635cba55fe2b.tar.gz phosphor-ipmi-blobs-7210b3109d3c93dd95eec0f74ab0635cba55fe2b.zip |
header: install test mock headers
IPMI Blob handlers will need to include these mocks when building
unit-tests. Therefore, they must be installed.
Change-Id: I4c8ed0fa1a4a8912853c024206ef5e61f87707d8
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'blobs-ipmid/test/manager_mock.hpp')
-rw-r--r-- | blobs-ipmid/test/manager_mock.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/blobs-ipmid/test/manager_mock.hpp b/blobs-ipmid/test/manager_mock.hpp new file mode 100644 index 0000000..3a9d065 --- /dev/null +++ b/blobs-ipmid/test/manager_mock.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include <blobs-ipmid/blobs.hpp> +#include <blobs-ipmid/manager.hpp> +#include <memory> +#include <string> + +#include <gmock/gmock.h> + +namespace blobs +{ + +class ManagerMock : public ManagerInterface +{ + public: + virtual ~ManagerMock() = default; + + MOCK_METHOD1(registerHandler, bool(std::unique_ptr<GenericBlobInterface>)); + MOCK_METHOD0(buildBlobList, uint32_t()); + MOCK_METHOD1(getBlobId, std::string(uint32_t)); + MOCK_METHOD3(open, bool(uint16_t, const std::string&, uint16_t*)); + MOCK_METHOD2(stat, bool(const std::string&, struct BlobMeta*)); + MOCK_METHOD2(stat, bool(uint16_t, struct BlobMeta*)); + MOCK_METHOD2(commit, bool(uint16_t, const std::vector<uint8_t>&)); + MOCK_METHOD1(close, bool(uint16_t)); + MOCK_METHOD3(read, std::vector<uint8_t>(uint16_t, uint32_t, uint32_t)); + MOCK_METHOD3(write, bool(uint16_t, uint32_t, const std::vector<uint8_t>&)); + MOCK_METHOD1(deleteBlob, bool(const std::string&)); +}; +} // namespace blobs |