2 Copyright (c) 2018-2021 Nokia.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
18 * This source code is part of the near-RT RIC (RAN Intelligent Controller)
19 * platform project (RICP).
22 #ifndef SHAREDDATALAYER_TST_SYNCSTORAGEIMPLMOCK_HPP_
23 #define SHAREDDATALAYER_TST_SYNCSTORAGEIMPLMOCK_HPP_
26 #include "private/syncstorageimpl.hpp"
27 #include <gmock/gmock.h>
29 namespace shareddatalayer
33 class SyncStorageImplMock: public SyncStorageImpl
36 SyncStorageImplMock(std::unique_ptr<AsyncStorageImpl> asyncStorageImpl):
37 SyncStorageImpl(std::move(asyncStorageImpl)) {}
40 void(const Namespace& ns, const DataMap& dataMap));
43 bool(const Namespace& ns, const Key& key, const Data& oldData, const Data& newData));
46 bool(const Namespace& ns, const DataMap& dataToBeChecked, const Keys& keysWhichShouldNotExist, const DataMap& dataToBeWritten));
48 MOCK_METHOD3(setIfNotExists,
49 bool(const Namespace& ns, const Key& key, const Data& data));
52 DataMap(const Namespace& ns, const Keys& keys));
55 void(const Namespace& ns, const Keys& keys));
57 MOCK_METHOD3(removeIf,
58 bool(const Namespace& ns, const Key& key, const Data& data));
60 MOCK_METHOD2(findKeys,
61 Keys(const Namespace& ns, const std::string& keyPrefix));
63 MOCK_METHOD1(removeAll,
64 void(const Namespace& ns));