blob: 5808f503894b34724b437de164c54513a7483f88 [file] [log] [blame]
Chris Masone626719f2011-08-18 16:58:48 -07001// 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_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;
21
22class MockDeviceInfo : public DeviceInfo {
23 public:
24 MockDeviceInfo(ControlInterface *control_interface,
25 EventDispatcher *dispatcher,
Darin Petkov1bdedf12011-08-26 13:32:11 -070026 Manager *manager);
27 virtual ~MockDeviceInfo();
Chris Masone626719f2011-08-18 16:58:48 -070028
Hristo Stefanoved2c28c2011-11-29 15:37:30 -080029 MOCK_CONST_METHOD2(GetMACAddress, bool(int interface_index,
30 ByteString* address));
31 MOCK_CONST_METHOD2(GetFlags, bool(int interface_index,
32 unsigned int* flags));
33 MOCK_CONST_METHOD2(GetAddresses, bool(int interface_index,
34 std::vector<AddressData>* addresses));
35 MOCK_CONST_METHOD1(FlushAddresses, void(int interface_index));
Chris Masone626719f2011-08-18 16:58:48 -070036
37 private:
38 DISALLOW_COPY_AND_ASSIGN(MockDeviceInfo);
39};
40
41} // namespace shill
42
43#endif // SHILL_MOCK_DEVICE_INFO_