blob: 6f21fd0b565033858dc533769dc98a72b390d5ed [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
Chris Masoneb9c00592011-10-06 13:10:39 -070020 MOCK_METHOD0(Flush, bool());
Darin Petkovba40dd32011-07-11 20:06:39 -070021 MOCK_METHOD0(GetGroups, std::set<std::string>());
22 MOCK_METHOD1(ContainsGroup, bool(const std::string &group));
23 MOCK_METHOD2(DeleteKey,
24 bool(const std::string &group, const std::string &key));
25 MOCK_METHOD1(DeleteGroup, bool(const std::string &group));
26 MOCK_METHOD3(GetString, bool(const std::string &group,
27 const std::string &key,
28 std::string *value));
29 MOCK_METHOD3(SetString, bool(const std::string &group,
30 const std::string &key,
31 const std::string &value));
32 MOCK_METHOD3(GetBool, bool(const std::string &group,
33 const std::string &key,
34 bool *value));
35 MOCK_METHOD3(SetBool, bool(const std::string &group,
36 const std::string &key,
37 bool value));
38 MOCK_METHOD3(GetInt, bool(const std::string &group,
39 const std::string &key,
40 int *value));
41 MOCK_METHOD3(SetInt, bool(const std::string &group,
42 const std::string &key,
43 int value));
44 MOCK_METHOD3(GetStringList, bool(const std::string &group,
45 const std::string &key,
46 std::vector<std::string> *value));
47 MOCK_METHOD3(SetStringList, bool(const std::string &group,
48 const std::string &key,
49 const std::vector<std::string> &value));
50 MOCK_METHOD3(GetCryptedString, bool(const std::string &group,
51 const std::string &key,
52 std::string *value));
53 MOCK_METHOD3(SetCryptedString, bool(const std::string &group,
54 const std::string &key,
55 const std::string &value));
Darin Petkoveac68e62011-08-26 16:24:51 -070056
57 private:
58 DISALLOW_COPY_AND_ASSIGN(MockStore);
Darin Petkovba40dd32011-07-11 20:06:39 -070059};
60
61} // namespace shill
62
63#endif // SHILL_MOCK_STORE_