Kun Yi | 91beea6 | 2018-11-26 15:23:14 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Kun Yi | 68c8114 | 2018-12-18 11:17:14 -0800 | [diff] [blame] | 3 | #include "binarystore_mock.hpp" |
Kun Yi | 91beea6 | 2018-11-26 15:23:14 -0800 | [diff] [blame] | 4 | #include "handler.hpp" |
| 5 | |
Kun Yi | 64dc05c | 2018-12-19 13:19:03 -0800 | [diff] [blame^] | 6 | #include <memory> |
| 7 | #include <string> |
| 8 | |
Kun Yi | 91beea6 | 2018-11-26 15:23:14 -0800 | [diff] [blame] | 9 | #include <gtest/gtest.h> |
| 10 | |
Kun Yi | 64dc05c | 2018-12-19 13:19:03 -0800 | [diff] [blame^] | 11 | using ::testing::Contains; |
| 12 | |
| 13 | using namespace std::string_literals; |
| 14 | |
Kun Yi | 91beea6 | 2018-11-26 15:23:14 -0800 | [diff] [blame] | 15 | namespace blobs |
| 16 | { |
| 17 | |
| 18 | class BinaryStoreBlobHandlerTest : public ::testing::Test |
| 19 | { |
| 20 | protected: |
| 21 | BinaryStoreBlobHandlerTest() = default; |
Kun Yi | 68c8114 | 2018-12-18 11:17:14 -0800 | [diff] [blame] | 22 | BinaryStoreBlobHandler handler; |
Kun Yi | 91beea6 | 2018-11-26 15:23:14 -0800 | [diff] [blame] | 23 | |
Kun Yi | 64dc05c | 2018-12-19 13:19:03 -0800 | [diff] [blame^] | 24 | std::unique_ptr<binstore::MockBinaryStore> |
| 25 | defaultMockStore(const std::string& baseId) |
| 26 | { |
| 27 | return std::make_unique<binstore::MockBinaryStore>(baseId, 0, 0, 0); |
| 28 | } |
| 29 | |
| 30 | void addDefaultStore(const std::string& baseId) |
| 31 | { |
| 32 | handler.addNewBinaryStore(defaultMockStore(baseId)); |
| 33 | } |
Kun Yi | 38146a0 | 2018-12-18 21:54:26 -0800 | [diff] [blame] | 34 | }; |
| 35 | |
Kun Yi | 91beea6 | 2018-11-26 15:23:14 -0800 | [diff] [blame] | 36 | } // namespace blobs |