ifw-fcf  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mockDbAdapter.hpp
Go to the documentation of this file.
1 #include "gmock/gmock.h"
2 
3 // Local headers
4 #include <rad/dbAdapter.hpp>
5 
6 class MockDbAdapter : public rad::DbAdapter
7 {
8 public:
9 
10  MOCK_METHOD2(Config, void(const std::string& endpoint, const timeval& timeout));
11  MOCK_METHOD1(Delete, int(const std::vector<std::string>& keys));
12  MOCK_METHOD1(Exists, bool(const std::string& key));
13 
14  MOCK_METHOD1(Get, std::string(const std::string& key));
15  MOCK_METHOD1(MultiGet, std::vector<std::string>(const std::vector<std::string>& keys));
16  MOCK_METHOD2(Get, std::string(const std::string& key, const std::string& field));
17  MOCK_METHOD2(MultiGet, std::vector<std::string>(const std::string& key,
18  const std::vector<std::string>& fields));
19  MOCK_METHOD2(Scan, std::map<std::string,std::string>(const std::string& sorted_set,
20  const std::string& pattern));
21 
22  MOCK_METHOD2(Set, void(const std::string& key, const std::string& value));
23  MOCK_METHOD1(MultiSet, void(const std::vector<std::string>& kvs));
24  MOCK_METHOD3(Set, void(const std::string& key,
25  const std::string& field,
26  const std::string& value));
27  MOCK_METHOD2(MultiSet, void(const std::string& key,
28  const std::vector<std::string>& fvs));
29 
30 
31  MOCK_METHOD0(Connect, void());
32  MOCK_METHOD0(Disconnect, void());
33  MOCK_METHOD0(IsConnected, bool());
34 };
35 
MOCK_METHOD3(Set, void(const std::string &key, const std::string &field, const std::string &value))
MOCK_METHOD0(Connect, void())
MOCK_METHOD2(Config, void(const std::string &endpoint, const timeval &timeout))
Definition: mockDbAdapter.hpp:6
MOCK_METHOD1(Delete, int(const std::vector< std::string > &keys))