Add extra line about src files are part of RIC platform project
[ric-plt/sdl.git] / include / private / tst / hiredissystemmock.hpp
1 /*
2    Copyright (c) 2018-2019 Nokia.
3
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
7
8        http://www.apache.org/licenses/LICENSE-2.0
9
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.
15 */
16
17 /*
18  * This source code is part of the near-RT RIC (RAN Intelligent Controller)
19  * platform project (RICP).
20 */
21
22 #ifndef SHAREDDATALAYER_TST_HIREDISSYSTEMMOCK_HPP_
23 #define SHAREDDATALAYER_TST_HIREDISSYSTEMMOCK_HPP_
24
25 #include <gmock/gmock.h>
26 #include "private/redis/hiredissystem.hpp"
27
28 namespace shareddatalayer
29 {
30     namespace tst
31     {
32         class HiredisSystemMock: public redis::HiredisSystem
33         {
34         public:
35             MOCK_METHOD2(redisConnect, redisContext*(const char* ip, int port));
36
37             MOCK_METHOD4(redisCommandArgv, void*(redisContext* context,
38                                                  int argc,
39                                                  const char** argv,
40                                                  const size_t* argvlen));
41
42             MOCK_METHOD1(freeReplyObject, void(void* reply));
43
44             MOCK_METHOD1(redisFree, void(redisContext* context));
45
46             MOCK_METHOD2(redisAsyncConnect, redisAsyncContext*(const char* ip, int port));
47
48             MOCK_METHOD2(redisAsyncSetConnectCallback, int(redisAsyncContext* ac, redisConnectCallback* fn));
49
50             MOCK_METHOD2(redisAsyncSetDisconnectCallback, int(redisAsyncContext* ac, redisDisconnectCallback* fn));
51
52             MOCK_METHOD6(redisAsyncCommandArgv, int(redisAsyncContext* ac,
53                                                     redisCallbackFn* fn,
54                                                     void* privdata,
55                                                     int argc,
56                                                     const char** argv,
57                                                     const size_t* argvlen));
58
59             MOCK_METHOD1(redisAsyncHandleRead, void(redisAsyncContext* ac));
60
61             MOCK_METHOD1(redisAsyncHandleWrite, void(redisAsyncContext* ac));
62
63             MOCK_METHOD1(redisAsyncDisconnect, void(redisAsyncContext* ac));
64
65             MOCK_METHOD1(redisAsyncFree, void(redisAsyncContext* ac));
66         };
67     }
68 }
69
70 #endif