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 | |
Darin Petkov | ba40dd3 | 2011-07-11 20:06:39 -0700 | [diff] [blame] | 20 | 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 Petkov | eac68e6 | 2011-08-26 16:24:51 -0700 | [diff] [blame] | 55 | |
| 56 | private: |
| 57 | DISALLOW_COPY_AND_ASSIGN(MockStore); |
Darin Petkov | ba40dd3 | 2011-07-11 20:06:39 -0700 | [diff] [blame] | 58 | }; |
| 59 | |
| 60 | } // namespace shill |
| 61 | |
| 62 | #endif // SHILL_MOCK_STORE_ |