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)); |
Paul Stewart | 5dc40aa | 2011-10-28 19:43:43 -0700 | [diff] [blame^] | 26 | MOCK_METHOD1(SetHeader, bool(const std::string &header)); |
Darin Petkov | ba40dd3 | 2011-07-11 20:06:39 -0700 | [diff] [blame] | 27 | 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 Petkov | eac68e6 | 2011-08-26 16:24:51 -0700 | [diff] [blame] | 57 | |
| 58 | private: |
| 59 | DISALLOW_COPY_AND_ASSIGN(MockStore); |
Darin Petkov | ba40dd3 | 2011-07-11 20:06:39 -0700 | [diff] [blame] | 60 | }; |
| 61 | |
| 62 | } // namespace shill |
| 63 | |
| 64 | #endif // SHILL_MOCK_STORE_ |