blob: 922074156eef2645998c48a87035e31739400978 [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));
Paul Stewart5dc40aa2011-10-28 19:43:43 -070026 MOCK_METHOD1(SetHeader, bool(const std::string &header));
Darin Petkovba40dd32011-07-11 20:06:39 -070027 MOCK_METHOD3(GetString, bool(const std::string &group,
28 const std::string &key,
29 std::string *value));
30 MOCK_METHOD3(SetString, bool(const std::string &group,
31 const std::string &key,
32 const std::string &value));
33 MOCK_METHOD3(GetBool, bool(const std::string &group,
34 const std::string &key,
35 bool *value));
36 MOCK_METHOD3(SetBool, bool(const std::string &group,
37 const std::string &key,
38 bool value));
39 MOCK_METHOD3(GetInt, bool(const std::string &group,
40 const std::string &key,
41 int *value));
42 MOCK_METHOD3(SetInt, bool(const std::string &group,
43 const std::string &key,
44 int value));
45 MOCK_METHOD3(GetStringList, bool(const std::string &group,
46 const std::string &key,
47 std::vector<std::string> *value));
48 MOCK_METHOD3(SetStringList, bool(const std::string &group,
49 const std::string &key,
50 const std::vector<std::string> &value));
51 MOCK_METHOD3(GetCryptedString, bool(const std::string &group,
52 const std::string &key,
53 std::string *value));
54 MOCK_METHOD3(SetCryptedString, bool(const std::string &group,
55 const std::string &key,
56 const std::string &value));
Darin Petkoveac68e62011-08-26 16:24:51 -070057
58 private:
59 DISALLOW_COPY_AND_ASSIGN(MockStore);
Darin Petkovba40dd32011-07-11 20:06:39 -070060};
61
62} // namespace shill
63
64#endif // SHILL_MOCK_STORE_