Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -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 | |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 5 | #ifndef SHILL_MOCK_PROPERTY_STORE_H_ |
| 6 | #define SHILL_MOCK_PROPERTY_STORE_H_ |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 7 | |
Hristo Stefanov | ed2c28c | 2011-11-29 15:37:30 -0800 | [diff] [blame] | 8 | #include <string> |
| 9 | |
Ben Chan | cc67c52 | 2014-09-03 07:19:18 -0700 | [diff] [blame] | 10 | #include <base/macros.h> |
Darin Petkov | ef34f18 | 2011-08-26 14:14:40 -0700 | [diff] [blame] | 11 | #include <gmock/gmock.h> |
| 12 | |
| 13 | #include "shill/property_store.h" |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 14 | |
| 15 | namespace shill { |
| 16 | |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 17 | class MockPropertyStore : public PropertyStore { |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 18 | public: |
Darin Petkov | ef34f18 | 2011-08-26 14:14:40 -0700 | [diff] [blame] | 19 | MockPropertyStore(); |
Ben Chan | 5ea763b | 2014-08-13 11:07:54 -0700 | [diff] [blame] | 20 | ~MockPropertyStore() override; |
Darin Petkov | ef34f18 | 2011-08-26 14:14:40 -0700 | [diff] [blame] | 21 | |
mukesh agrawal | de29fa8 | 2011-09-16 16:16:36 -0700 | [diff] [blame] | 22 | MOCK_CONST_METHOD1(Contains, bool(const std::string&)); |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 23 | MOCK_METHOD3(SetBoolProperty, bool(const std::string&, bool, Error*)); |
Ben Chan | 7fab897 | 2014-08-10 17:14:46 -0700 | [diff] [blame] | 24 | MOCK_METHOD3(SetInt16Property, bool(const std::string&, int16_t, Error*)); |
| 25 | MOCK_METHOD3(SetInt32Property, bool(const std::string&, int32_t, Error*)); |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 26 | MOCK_METHOD3(SetStringProperty, bool(const std::string&, |
| 27 | const std::string&, |
| 28 | Error*)); |
Chris Masone | a8a2c25 | 2011-06-27 22:16:30 -0700 | [diff] [blame] | 29 | MOCK_METHOD3(SetStringmapProperty, bool(const std::string&, |
| 30 | const Stringmap&, |
| 31 | Error*)); |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 32 | MOCK_METHOD3(SetStringsProperty, bool(const std::string&, |
Chris Masone | a8a2c25 | 2011-06-27 22:16:30 -0700 | [diff] [blame] | 33 | const Strings&, |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 34 | Error*)); |
Ben Chan | 7fab897 | 2014-08-10 17:14:46 -0700 | [diff] [blame] | 35 | MOCK_METHOD3(SetUint8Property, bool(const std::string&, uint8_t, Error*)); |
| 36 | MOCK_METHOD3(SetUint16Property, bool(const std::string&, uint16_t, Error*)); |
mukesh agrawal | e7c7e65 | 2013-06-18 17:19:39 -0700 | [diff] [blame] | 37 | MOCK_METHOD3(SetUint16sProperty, bool(const std::string&, |
Paul Stewart | 1e006c6 | 2015-06-16 12:29:06 -0700 | [diff] [blame] | 38 | const Uint16s&, Error*)); |
Ben Chan | 7fab897 | 2014-08-10 17:14:46 -0700 | [diff] [blame] | 39 | MOCK_METHOD3(SetUint32Property, bool(const std::string&, uint32_t, Error*)); |
| 40 | MOCK_METHOD3(SetUint64Property, bool(const std::string&, uint64_t, Error*)); |
mukesh agrawal | 8abd2f6 | 2012-01-30 14:56:14 -0800 | [diff] [blame] | 41 | MOCK_METHOD2(ClearProperty, bool(const std::string&, Error*)); |
Chris Masone | 3bd3c8c | 2011-06-13 08:20:26 -0700 | [diff] [blame] | 42 | |
| 43 | private: |
| 44 | DISALLOW_COPY_AND_ASSIGN(MockPropertyStore); |
| 45 | }; |
| 46 | |
| 47 | } // namespace shill |
| 48 | |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 49 | #endif // SHILL_MOCK_PROPERTY_STORE_H_ |