Paul Stewart | cf199de | 2012-08-16 07:50:41 -0700 | [diff] [blame] | 1 | // Copyright (c) 2012 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_ETHERNET_H_ |
| 6 | #define SHILL_MOCK_ETHERNET_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <gmock/gmock.h> |
| 11 | |
| 12 | #include "shill/refptr_types.h" |
| 13 | #include "shill/ethernet.h" |
| 14 | |
| 15 | namespace shill { |
| 16 | |
| 17 | class ControlInterface; |
| 18 | class Error; |
| 19 | class EventDispatcher; |
| 20 | |
| 21 | class MockEthernet : public Ethernet { |
| 22 | public: |
| 23 | MockEthernet(ControlInterface *control_interface, |
| 24 | EventDispatcher *dispatcher, |
| 25 | Metrics *metrics, |
| 26 | Manager *manager, |
| 27 | const std::string &link_name, |
| 28 | const std::string &address, |
| 29 | int interface_index); |
| 30 | virtual ~MockEthernet(); |
| 31 | |
| 32 | MOCK_METHOD2(Start, void(Error *error, |
| 33 | const EnabledStateChangedCallback &callback)); |
| 34 | MOCK_METHOD2(Stop, void(Error *error, |
| 35 | const EnabledStateChangedCallback &callback)); |
| 36 | |
| 37 | private: |
| 38 | DISALLOW_COPY_AND_ASSIGN(MockEthernet); |
| 39 | }; |
| 40 | |
| 41 | } // namespace shill |
| 42 | |
| 43 | #endif // SHILL_MOCK_ETHERNET_H_ |