Paul Stewart | 1b1a7f2 | 2012-01-06 16:24:06 -0800 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Wade Guthrie | 60a3706 | 2013-04-02 11:39:09 -0700 | [diff] [blame] | 5 | #ifndef SHILL_MOCK_PROFILE_H_ |
| 6 | #define SHILL_MOCK_PROFILE_H_ |
Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <gmock/gmock.h> |
| 11 | |
| 12 | #include "shill/profile.h" |
Wade Guthrie | 60a3706 | 2013-04-02 11:39:09 -0700 | [diff] [blame] | 13 | #include "shill/wifi_provider.h" |
Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 14 | |
Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 15 | namespace shill { |
| 16 | |
Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 17 | class MockProfile : public Profile { |
| 18 | public: |
Thieu Le | 5133b71 | 2013-02-19 14:47:21 -0800 | [diff] [blame] | 19 | MockProfile(ControlInterface *control, Metrics *metrics, Manager *manager); |
Chris Masone | 2ae797d | 2011-08-23 20:41:00 -0700 | [diff] [blame] | 20 | MockProfile(ControlInterface *control, |
Thieu Le | 5133b71 | 2013-02-19 14:47:21 -0800 | [diff] [blame] | 21 | Metrics *metrics, |
Chris Masone | 7df0c67 | 2011-07-15 10:24:54 -0700 | [diff] [blame] | 22 | Manager *manager, |
| 23 | const std::string &identifier); |
Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 24 | virtual ~MockProfile(); |
| 25 | |
Paul Stewart | 3d9bcf5 | 2011-12-12 15:02:22 -0800 | [diff] [blame] | 26 | MOCK_METHOD1(AdoptService, bool(const ServiceRefPtr &service)); |
| 27 | MOCK_METHOD1(AbandonService, bool(const ServiceRefPtr &service)); |
Paul Stewart | 2c575d2 | 2012-12-07 12:28:57 -0800 | [diff] [blame] | 28 | MOCK_METHOD1(LoadService, bool(const ServiceRefPtr &service)); |
Paul Stewart | a41e38d | 2011-11-11 07:47:29 -0800 | [diff] [blame] | 29 | MOCK_METHOD1(ConfigureService, bool(const ServiceRefPtr &service)); |
| 30 | MOCK_METHOD1(ConfigureDevice, bool(const DeviceRefPtr &device)); |
Darin Petkov | 9c6e981 | 2013-03-26 13:49:07 +0100 | [diff] [blame] | 31 | MOCK_METHOD2(DeleteEntry, void(const std::string &entry_name, Error *error)); |
Paul Stewart | 1b1a7f2 | 2012-01-06 16:24:06 -0800 | [diff] [blame] | 32 | MOCK_METHOD0(GetRpcIdentifier, std::string()); |
Paul Stewart | 5ad1606 | 2013-02-21 18:10:48 -0800 | [diff] [blame] | 33 | MOCK_METHOD1(GetStoragePath, bool(base::FilePath *filepath)); |
Paul Stewart | 7f61e52 | 2012-03-22 11:13:45 -0700 | [diff] [blame] | 34 | MOCK_METHOD1(UpdateService, bool(const ServiceRefPtr &service)); |
Darin Petkov | e7c6ad3 | 2012-06-29 10:22:09 +0200 | [diff] [blame] | 35 | MOCK_METHOD1(UpdateDevice, bool(const DeviceRefPtr &device)); |
Wade Guthrie | 60a3706 | 2013-04-02 11:39:09 -0700 | [diff] [blame] | 36 | MOCK_METHOD1(UpdateWiFiProvider, bool(const WiFiProvider &wifi_provider)); |
Chris Masone | b9c0059 | 2011-10-06 13:10:39 -0700 | [diff] [blame] | 37 | MOCK_METHOD0(Save, bool()); |
Paul Stewart | 6681533 | 2012-04-09 18:09:36 -0700 | [diff] [blame] | 38 | MOCK_CONST_METHOD0(GetConstStorage, const StoreInterface *()); |
Chris Masone | 9d77993 | 2011-08-25 16:33:41 -0700 | [diff] [blame] | 39 | |
Chris Masone | 7aa5f90 | 2011-07-11 11:13:35 -0700 | [diff] [blame] | 40 | private: |
| 41 | DISALLOW_COPY_AND_ASSIGN(MockProfile); |
| 42 | }; |
| 43 | |
| 44 | } // namespace shill |
| 45 | |
Wade Guthrie | 60a3706 | 2013-04-02 11:39:09 -0700 | [diff] [blame] | 46 | #endif // SHILL_MOCK_PROFILE_H_ |