Darin Petkov | ba40dd3 | 2011-07-11 20:06:39 -0700 | [diff] [blame] | 1 | // 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 Petkov | eac68e6 | 2011-08-26 16:24:51 -0700 | [diff] [blame] | 8 | #include <base/basictypes.h> |
Darin Petkov | ba40dd3 | 2011-07-11 20:06:39 -0700 | [diff] [blame] | 9 | #include <gmock/gmock.h> |
| 10 | |
| 11 | #include "shill/store_interface.h" |
| 12 | |
| 13 | namespace shill { |
| 14 | |
| 15 | class MockStore : public StoreInterface { |
| 16 | public: |
Darin Petkov | eac68e6 | 2011-08-26 16:24:51 -0700 | [diff] [blame] | 17 | MockStore(); |
| 18 | virtual ~MockStore(); |
| 19 | |
Chris Masone | b9c0059 | 2011-10-06 13:10:39 -0700 | [diff] [blame] | 20 | MOCK_METHOD0(Flush, bool()); |
Darin Petkov | ba40dd3 | 2011-07-11 20:06:39 -0700 | [diff] [blame] | 21 | 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 Petkov | eac68e6 | 2011-08-26 16:24:51 -0700 | [diff] [blame] | 56 | |
| 57 | private: |
| 58 | DISALLOW_COPY_AND_ASSIGN(MockStore); |
Darin Petkov | ba40dd3 | 2011-07-11 20:06:39 -0700 | [diff] [blame] | 59 | }; |
| 60 | |
| 61 | } // namespace shill |
| 62 | |
| 63 | #endif // SHILL_MOCK_STORE_ |