blob: a6190c376d0935b225c885007ca59ede3da95fae [file] [log] [blame]
Thieu Le3426c8f2012-01-11 17:35:11 -08001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Chris Masone626719f2011-08-18 16:58:48 -07002// 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_INFO_
6#define SHILL_MOCK_DEVICE_INFO_
7
Hristo Stefanoved2c28c2011-11-29 15:37:30 -08008#include <vector>
9
Darin Petkov1bdedf12011-08-26 13:32:11 -070010#include <base/basictypes.h>
Chris Masone626719f2011-08-18 16:58:48 -070011#include <gmock/gmock.h>
12
13#include "shill/device_info.h"
14
15namespace shill {
16
17class ByteString;
18class ControlInterface;
19class EventDispatcher;
20class Manager;
Thieu Le3426c8f2012-01-11 17:35:11 -080021class Metrics;
Chris Masone626719f2011-08-18 16:58:48 -070022
23class MockDeviceInfo : public DeviceInfo {
24 public:
25 MockDeviceInfo(ControlInterface *control_interface,
26 EventDispatcher *dispatcher,
Thieu Le3426c8f2012-01-11 17:35:11 -080027 Metrics *metrics,
Darin Petkov1bdedf12011-08-26 13:32:11 -070028 Manager *manager);
29 virtual ~MockDeviceInfo();
Chris Masone626719f2011-08-18 16:58:48 -070030
Paul Stewartc8f4bef2011-12-13 09:45:51 -080031 MOCK_CONST_METHOD1(GetDevice, DeviceRefPtr(int interface_index));
Hristo Stefanoved2c28c2011-11-29 15:37:30 -080032 MOCK_CONST_METHOD2(GetMACAddress, bool(int interface_index,
33 ByteString* address));
34 MOCK_CONST_METHOD2(GetFlags, bool(int interface_index,
35 unsigned int* flags));
36 MOCK_CONST_METHOD2(GetAddresses, bool(int interface_index,
37 std::vector<AddressData>* addresses));
38 MOCK_CONST_METHOD1(FlushAddresses, void(int interface_index));
Chris Masone626719f2011-08-18 16:58:48 -070039
40 private:
41 DISALLOW_COPY_AND_ASSIGN(MockDeviceInfo);
42};
43
44} // namespace shill
45
46#endif // SHILL_MOCK_DEVICE_INFO_