blob: 10c6a2cf8266ffbd97305b8099a961a90af70095 [file] [log] [blame]
Chris Masone9be4a9d2011-05-16 15:44:09 -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_
6#define SHILL_MOCK_DEVICE_
7
8#include <base/memory/ref_counted.h>
9#include <gmock/gmock.h>
10
11#include "shill/device.h"
12
13namespace shill {
14
15class ControlInterface;
16class EventDispatcher;
17
18using ::testing::_;
19using ::testing::Return;
20
21class MockDevice : public Device {
22 public:
23 // A constructor for the Device object
24 MockDevice(ControlInterface *control_interface,
Paul Stewartb50f0b92011-05-16 16:31:42 -070025 EventDispatcher *dispatcher,
26 const string &link_name,
27 int interface_index)
28 : Device(control_interface, dispatcher, link_name, interface_index) {
Chris Masone9be4a9d2011-05-16 15:44:09 -070029 ON_CALL(*this, TechnologyIs(_)).WillByDefault(Return(false));
30 }
31 virtual ~MockDevice() {}
32
33 MOCK_METHOD0(Start, void(void));
34 MOCK_METHOD0(Stop, void(void));
35 MOCK_METHOD1(TechnologyIs, bool(Technology));
36
37 private:
38 DISALLOW_COPY_AND_ASSIGN(MockDevice);
39};
40
41} // namespace shill
42
43#endif // SHILL_MOCK_DEVICE_