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 | a82b711 | 2011-05-25 15:16:29 -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 | #include "shill/mock_device.h" |
| 6 | |
| 7 | #include <string> |
| 8 | |
| 9 | #include <base/memory/ref_counted.h> |
| 10 | #include <base/stringprintf.h> |
| 11 | #include <gmock/gmock.h> |
| 12 | |
| 13 | namespace shill { |
| 14 | |
| 15 | class ControlInterface; |
| 16 | class EventDispatcher; |
| 17 | |
| 18 | using ::testing::_; |
Gaurav Shah | 435de2c | 2011-11-17 19:01:07 -0800 | [diff] [blame] | 19 | using ::testing::DefaultValue; |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 20 | using ::testing::Return; |
| 21 | using std::string; |
| 22 | |
| 23 | MockDevice::MockDevice(ControlInterface *control_interface, |
| 24 | EventDispatcher *dispatcher, |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 25 | Metrics *metrics, |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 26 | Manager *manager, |
| 27 | const std::string &link_name, |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 28 | const std::string &address, |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 29 | int interface_index) |
| 30 | : Device(control_interface, |
| 31 | dispatcher, |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 32 | metrics, |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 33 | manager, |
| 34 | link_name, |
Chris Masone | 626719f | 2011-08-18 16:58:48 -0700 | [diff] [blame] | 35 | address, |
Gaurav Shah | 435de2c | 2011-11-17 19:01:07 -0800 | [diff] [blame] | 36 | interface_index, |
| 37 | Technology::kUnknown) { |
Gaurav Shah | 435de2c | 2011-11-17 19:01:07 -0800 | [diff] [blame] | 38 | DefaultValue<Technology::Identifier>::Set(Technology::kUnknown); |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | MockDevice::~MockDevice() {} |
| 42 | |
| 43 | } // namespace shill |