Chris Masone | 9be4a9d | 2011-05-16 15:44:09 -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_DEVICE_ |
| 6 | #define SHILL_MOCK_DEVICE_ |
| 7 | |
Chris Masone | 46eaaf5 | 2011-05-24 13:08:30 -0700 | [diff] [blame] | 8 | #include <string> |
| 9 | |
Chris Masone | 9be4a9d | 2011-05-16 15:44:09 -0700 | [diff] [blame] | 10 | #include <base/memory/ref_counted.h> |
| 11 | #include <gmock/gmock.h> |
| 12 | |
| 13 | #include "shill/device.h" |
| 14 | |
| 15 | namespace shill { |
| 16 | |
Chris Masone | 9be4a9d | 2011-05-16 15:44:09 -0700 | [diff] [blame] | 17 | class MockDevice : public Device { |
| 18 | public: |
Chris Masone | 9be4a9d | 2011-05-16 15:44:09 -0700 | [diff] [blame] | 19 | MockDevice(ControlInterface *control_interface, |
Paul Stewart | b50f0b9 | 2011-05-16 16:31:42 -0700 | [diff] [blame] | 20 | EventDispatcher *dispatcher, |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 21 | Manager *manager, |
| 22 | const std::string &link_name, |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 23 | const std::string &address, |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 24 | int interface_index); |
| 25 | virtual ~MockDevice(); |
Chris Masone | 9be4a9d | 2011-05-16 15:44:09 -0700 | [diff] [blame] | 26 | |
Darin Petkov | 6f9eaa3 | 2011-08-09 15:26:44 -0700 | [diff] [blame] | 27 | MOCK_METHOD0(Start, void()); |
| 28 | MOCK_METHOD0(Stop, void()); |
Darin Petkov | c086531 | 2011-09-16 15:31:20 -0700 | [diff] [blame] | 29 | MOCK_METHOD1(Scan, void(Error *error)); |
Paul Stewart | fdd1607 | 2011-09-16 12:41:35 -0700 | [diff] [blame] | 30 | MOCK_CONST_METHOD1(TechnologyIs, |
| 31 | bool(const Technology::Identifier technology)); |
Paul Stewart | a41e38d | 2011-11-11 07:47:29 -0800 | [diff] [blame] | 32 | MOCK_METHOD1(Load, bool(StoreInterface*)); |
Chris Masone | 877ff98 | 2011-09-21 16:18:24 -0700 | [diff] [blame] | 33 | MOCK_METHOD1(Save, bool(StoreInterface*)); |
Paul Stewart | 2bf1d35 | 2011-12-06 15:02:55 -0800 | [diff] [blame] | 34 | MOCK_METHOD0(DisableIPv6, void()); |
| 35 | MOCK_METHOD0(EnableIPv6, void()); |
| 36 | MOCK_METHOD0(EnableIPv6Privacy, void()); |
Paul Stewart | c8f4bef | 2011-12-13 09:45:51 -0800 | [diff] [blame] | 37 | MOCK_METHOD0(DisableReversePathFilter, void()); |
| 38 | MOCK_METHOD0(EnableReversePathFilter, void()); |
Gaurav Shah | 435de2c | 2011-11-17 19:01:07 -0800 | [diff] [blame] | 39 | MOCK_CONST_METHOD0(technology, Technology::Identifier()); |
Chris Masone | 9be4a9d | 2011-05-16 15:44:09 -0700 | [diff] [blame] | 40 | |
| 41 | private: |
| 42 | DISALLOW_COPY_AND_ASSIGN(MockDevice); |
| 43 | }; |
| 44 | |
| 45 | } // namespace shill |
| 46 | |
| 47 | #endif // SHILL_MOCK_DEVICE_ |