blob: ded13ebd31931a1bb18ab9882be667f128ae5015 [file] [log] [blame]
Kun Yi91beea62018-11-26 15:23:14 -08001#pragma once
2
Kun Yi68c81142018-12-18 11:17:14 -08003#include "binarystore_mock.hpp"
Kun Yi91beea62018-11-26 15:23:14 -08004#include "handler.hpp"
5
Kun Yi64dc05c2018-12-19 13:19:03 -08006#include <memory>
7#include <string>
8
Kun Yi0a940b92019-01-07 16:33:11 -08009#include "binaryblob.pb.h"
10
Kun Yi91beea62018-11-26 15:23:14 -080011#include <gtest/gtest.h>
12
Kun Yi64dc05c2018-12-19 13:19:03 -080013using ::testing::Contains;
14
15using namespace std::string_literals;
16
Kun Yi91beea62018-11-26 15:23:14 -080017namespace blobs
18{
19
20class BinaryStoreBlobHandlerTest : public ::testing::Test
21{
22 protected:
23 BinaryStoreBlobHandlerTest() = default;
Kun Yi68c81142018-12-18 11:17:14 -080024 BinaryStoreBlobHandler handler;
Kun Yi91beea62018-11-26 15:23:14 -080025
Kun Yi64dc05c2018-12-19 13:19:03 -080026 std::unique_ptr<binstore::MockBinaryStore>
27 defaultMockStore(const std::string& baseId)
28 {
29 return std::make_unique<binstore::MockBinaryStore>(baseId, 0, 0, 0);
30 }
31
32 void addDefaultStore(const std::string& baseId)
33 {
34 handler.addNewBinaryStore(defaultMockStore(baseId));
35 }
Kun Yi38146a02018-12-18 21:54:26 -080036};
37
Kun Yi91beea62018-11-26 15:23:14 -080038} // namespace blobs