Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
Chris Masone | 626719f | 2011-08-18 16:58:48 -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 | |
| 5 | #ifndef SHILL_MOCK_MANAGER_ |
| 6 | #define SHILL_MOCK_MANAGER_ |
| 7 | |
Darin Petkov | ef34f18 | 2011-08-26 14:14:40 -0700 | [diff] [blame] | 8 | #include <base/basictypes.h> |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 9 | #include <gmock/gmock.h> |
| 10 | |
| 11 | #include "shill/manager.h" |
| 12 | |
| 13 | namespace shill { |
| 14 | |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 15 | class MockManager : public Manager { |
| 16 | public: |
| 17 | MockManager(ControlInterface *control_interface, |
| 18 | EventDispatcher *dispatcher, |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 19 | Metrics *metrics, |
Darin Petkov | ef34f18 | 2011-08-26 14:14:40 -0700 | [diff] [blame] | 20 | GLib *glib); |
| 21 | virtual ~MockManager(); |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 22 | |
Darin Petkov | f7ef50a | 2012-04-16 20:54:31 +0200 | [diff] [blame] | 23 | MOCK_METHOD0(device_info, DeviceInfo *()); |
Paul Stewart | 8c116a9 | 2012-05-02 18:30:03 -0700 | [diff] [blame] | 24 | MOCK_METHOD0(modem_info, ModemInfo *()); |
| 25 | MOCK_METHOD0(vpn_provider, VPNProvider *()); |
Darin Petkov | e4b2702 | 2012-05-16 13:28:50 +0200 | [diff] [blame] | 26 | MOCK_METHOD0(wimax_provider, WiMaxProvider *()); |
Darin Petkov | f7ef50a | 2012-04-16 20:54:31 +0200 | [diff] [blame] | 27 | MOCK_METHOD0(mutable_store, PropertyStore *()); |
| 28 | MOCK_CONST_METHOD0(store, const PropertyStore &()); |
| 29 | MOCK_CONST_METHOD0(run_path, const FilePath &()); |
Thieu Le | fb46caf | 2012-03-08 11:57:15 -0800 | [diff] [blame] | 30 | MOCK_METHOD0(Start, void()); |
Paul Stewart | 8c116a9 | 2012-05-02 18:30:03 -0700 | [diff] [blame] | 31 | MOCK_METHOD1(RegisterDevice, void(const DeviceRefPtr &to_manage)); |
| 32 | MOCK_METHOD1(DeregisterDevice, void(const DeviceRefPtr &to_forget)); |
mukesh agrawal | 4eb4d78 | 2011-12-05 17:34:37 +0000 | [diff] [blame] | 33 | MOCK_METHOD1(HasService, bool(const ServiceRefPtr &to_manage)); |
mukesh agrawal | 3239932 | 2011-09-01 10:53:43 -0700 | [diff] [blame] | 34 | MOCK_METHOD1(RegisterService, void(const ServiceRefPtr &to_manage)); |
mukesh agrawal | 00917ce | 2011-11-22 23:56:55 +0000 | [diff] [blame] | 35 | MOCK_METHOD1(UpdateService, void(const ServiceRefPtr &to_update)); |
Chris Masone | 6515aab | 2011-10-12 16:19:09 -0700 | [diff] [blame] | 36 | MOCK_METHOD1(DeregisterService, void(const ServiceRefPtr &to_forget)); |
Darin Petkov | a5e07ef | 2012-07-09 14:27:57 +0200 | [diff] [blame] | 37 | MOCK_METHOD1(RegisterDefaultServiceCallback, |
| 38 | int(const ServiceCallback &callback)); |
| 39 | MOCK_METHOD1(DeregisterDefaultServiceCallback, void(int tag)); |
Darin Petkov | e7c6ad3 | 2012-06-29 10:22:09 +0200 | [diff] [blame] | 40 | MOCK_METHOD1(UpdateDevice, void(const DeviceRefPtr &to_update)); |
Paul Stewart | d215af6 | 2012-04-24 23:25:50 -0700 | [diff] [blame] | 41 | MOCK_METHOD1(RecheckPortalOnService, void(const ServiceRefPtr &service)); |
Paul Stewart | 7522551 | 2012-01-26 22:51:33 -0800 | [diff] [blame] | 42 | MOCK_METHOD2(HandleProfileEntryDeletion, |
| 43 | bool (const ProfileRefPtr &profile, |
| 44 | const std::string &entry_name)); |
Paul Stewart | e2bad7c | 2012-03-14 08:55:33 -0700 | [diff] [blame] | 45 | MOCK_CONST_METHOD0(GetDefaultService, ServiceRefPtr()); |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 46 | MOCK_METHOD0(UpdateEnabledTechnologies, void()); |
Paul Stewart | 20088d8 | 2012-02-16 06:58:55 -0800 | [diff] [blame] | 47 | MOCK_METHOD1(IsPortalDetectionEnabled, bool(Technology::Identifier tech)); |
Paul Stewart | 10ccbb3 | 2012-04-26 15:59:30 -0700 | [diff] [blame] | 48 | MOCK_CONST_METHOD1(IsServiceEphemeral, |
| 49 | bool(const ServiceConstRefPtr &service)); |
Paul Stewart | 20088d8 | 2012-02-16 06:58:55 -0800 | [diff] [blame] | 50 | MOCK_CONST_METHOD0(GetPortalCheckURL, const std::string &()); |
Paul Stewart | c681fa0 | 2012-03-02 19:40:04 -0800 | [diff] [blame] | 51 | MOCK_CONST_METHOD0(GetPortalCheckInterval, int()); |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 52 | |
| 53 | private: |
| 54 | DISALLOW_COPY_AND_ASSIGN(MockManager); |
| 55 | }; |
| 56 | |
| 57 | } // namespace shill |
| 58 | |
| 59 | #endif // SHILL_MOCK_MANAGER_ |