blob: 70259f2fd1fc06a9508bf3063ef1b5cc19949c9b [file] [log] [blame]
Darin Petkovba40dd32011-07-11 20:06:39 -07001// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef SHILL_MOCK_STORE_
6#define SHILL_MOCK_STORE_
7
Darin Petkoveac68e62011-08-26 16:24:51 -07008#include <base/basictypes.h>
Darin Petkovba40dd32011-07-11 20:06:39 -07009#include <gmock/gmock.h>
10
11#include "shill/store_interface.h"
12
13namespace shill {
14
15class MockStore : public StoreInterface {
16 public:
Darin Petkoveac68e62011-08-26 16:24:51 -070017 MockStore();
18 virtual ~MockStore();
19
Darin Petkovba40dd32011-07-11 20:06:39 -070020 MOCK_METHOD0(GetGroups, std::set<std::string>());
21 MOCK_METHOD1(ContainsGroup, bool(const std::string &group));
22 MOCK_METHOD2(DeleteKey,
23 bool(const std::string &group, const std::string &key));
24 MOCK_METHOD1(DeleteGroup, bool(const std::string &group));
25 MOCK_METHOD3(GetString, bool(const std::string &group,
26 const std::string &key,
27 std::string *value));
28 MOCK_METHOD3(SetString, bool(const std::string &group,
29 const std::string &key,
30 const std::string &value));
31 MOCK_METHOD3(GetBool, bool(const std::string &group,
32 const std::string &key,
33 bool *value));
34 MOCK_METHOD3(SetBool, bool(const std::string &group,
35 const std::string &key,
36 bool value));
37 MOCK_METHOD3(GetInt, bool(const std::string &group,
38 const std::string &key,
39 int *value));
40 MOCK_METHOD3(SetInt, bool(const std::string &group,
41 const std::string &key,
42 int value));
43 MOCK_METHOD3(GetStringList, bool(const std::string &group,
44 const std::string &key,
45 std::vector<std::string> *value));
46 MOCK_METHOD3(SetStringList, bool(const std::string &group,
47 const std::string &key,
48 const std::vector<std::string> &value));
49 MOCK_METHOD3(GetCryptedString, bool(const std::string &group,
50 const std::string &key,
51 std::string *value));
52 MOCK_METHOD3(SetCryptedString, bool(const std::string &group,
53 const std::string &key,
54 const std::string &value));
Darin Petkoveac68e62011-08-26 16:24:51 -070055
56 private:
57 DISALLOW_COPY_AND_ASSIGN(MockStore);
Darin Petkovba40dd32011-07-11 20:06:39 -070058};
59
60} // namespace shill
61
62#endif // SHILL_MOCK_STORE_