Chris Masone | 34af218 | 2011-08-22 11:59:36 -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_IPCONFIG_ |
| 6 | #define SHILL_MOCK_IPCONFIG_ |
| 7 | |
Darin Petkov | ef34f18 | 2011-08-26 14:14:40 -0700 | [diff] [blame^] | 8 | #include <base/basictypes.h> |
Chris Masone | 34af218 | 2011-08-22 11:59:36 -0700 | [diff] [blame] | 9 | #include <gmock/gmock.h> |
| 10 | |
| 11 | #include "shill/ipconfig.h" |
| 12 | |
| 13 | namespace shill { |
Chris Masone | 34af218 | 2011-08-22 11:59:36 -0700 | [diff] [blame] | 14 | |
| 15 | class MockIPConfig : public IPConfig { |
| 16 | public: |
| 17 | MockIPConfig(ControlInterface *control_interface, |
Darin Petkov | ef34f18 | 2011-08-26 14:14:40 -0700 | [diff] [blame^] | 18 | const std::string &device_name); |
| 19 | virtual ~MockIPConfig(); |
Chris Masone | 34af218 | 2011-08-22 11:59:36 -0700 | [diff] [blame] | 20 | |
| 21 | MOCK_METHOD0(RequestIP, bool(void)); |
| 22 | MOCK_METHOD0(RenewIP, bool(void)); |
| 23 | MOCK_METHOD0(ReleaseIP, bool(void)); |
| 24 | |
| 25 | MOCK_METHOD2(Load, bool(StoreInterface *, const std::string &)); |
| 26 | MOCK_METHOD2(Save, bool(StoreInterface *, const std::string &)); |
Darin Petkov | ef34f18 | 2011-08-26 14:14:40 -0700 | [diff] [blame^] | 27 | |
| 28 | private: |
| 29 | DISALLOW_COPY_AND_ASSIGN(MockIPConfig); |
Chris Masone | 34af218 | 2011-08-22 11:59:36 -0700 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | } // namespace shill |
| 33 | |
| 34 | #endif // SHILL_MOCK_IPCONFIG_ |