blob: 4870309d4ad7718ea509e749d7d9a3bdf298679c [file] [log] [blame]
mukesh agrawal7a4e4002011-09-06 11:26:05 -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_WIFI_
6#define SHILL_MOCK_WIFI_
7
Hristo Stefanoved2c28c2011-11-29 15:37:30 -08008#include <map>
mukesh agrawal7a4e4002011-09-06 11:26:05 -07009#include <string>
10
11#include <base/memory/ref_counted.h>
12#include <gmock/gmock.h>
13
14#include "shill/key_value_store.h"
15#include "shill/refptr_types.h"
16#include "shill/wifi.h"
17#include "shill/wifi_service.h"
18
19namespace shill {
20
21class ControlInterface;
22class Error;
23class EventDispatcher;
24
25class MockWiFi : public WiFi {
26 public:
27 MockWiFi(ControlInterface *control_interface,
28 EventDispatcher *dispatcher,
29 Manager *manager,
30 const std::string &link_name,
31 const std::string &address,
32 int interface_index);
33 virtual ~MockWiFi();
34
35 MOCK_METHOD0(Start, void());
36 MOCK_METHOD0(Stop, void());
37 MOCK_METHOD1(Scan, void(Error *error));
38 MOCK_METHOD2(GetService,
39 WiFiServiceRefPtr(const KeyValueStore &args, Error *error));
mukesh agrawal6e277772011-09-29 15:04:23 -070040 MOCK_METHOD2(ConnectTo,
mukesh agrawal64896322011-12-01 01:13:10 +000041 void(WiFiService *service,
42 std::map<std::string, ::DBus::Variant> service_params));
mukesh agrawal7a4e4002011-09-06 11:26:05 -070043
44 private:
45 DISALLOW_COPY_AND_ASSIGN(MockWiFi);
46};
47
48} // namespace shill
49
50#endif // SHILL_MOCK_WIFI_