mukesh agrawal | 7a4e400 | 2011-09-06 11:26:05 -0700 | [diff] [blame] | 1 | // 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 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/memory/ref_counted.h> |
| 11 | #include <gmock/gmock.h> |
| 12 | |
| 13 | #include "shill/key_value_store.h" |
| 14 | #include "shill/refptr_types.h" |
| 15 | #include "shill/wifi.h" |
| 16 | #include "shill/wifi_service.h" |
| 17 | |
| 18 | namespace shill { |
| 19 | |
| 20 | class ControlInterface; |
| 21 | class Error; |
| 22 | class EventDispatcher; |
| 23 | |
| 24 | class MockWiFi : public WiFi { |
| 25 | public: |
| 26 | MockWiFi(ControlInterface *control_interface, |
| 27 | EventDispatcher *dispatcher, |
| 28 | Manager *manager, |
| 29 | const std::string &link_name, |
| 30 | const std::string &address, |
| 31 | int interface_index); |
| 32 | virtual ~MockWiFi(); |
| 33 | |
| 34 | MOCK_METHOD0(Start, void()); |
| 35 | MOCK_METHOD0(Stop, void()); |
| 36 | MOCK_METHOD1(Scan, void(Error *error)); |
| 37 | MOCK_METHOD2(GetService, |
| 38 | WiFiServiceRefPtr(const KeyValueStore &args, Error *error)); |
mukesh agrawal | 6e27777 | 2011-09-29 15:04:23 -0700 | [diff] [blame] | 39 | MOCK_METHOD2(ConnectTo, |
| 40 | void(WiFiService *, |
| 41 | const std::map<std::string, ::DBus::Variant> &)); |
mukesh agrawal | 7a4e400 | 2011-09-06 11:26:05 -0700 | [diff] [blame] | 42 | |
| 43 | private: |
| 44 | DISALLOW_COPY_AND_ASSIGN(MockWiFi); |
| 45 | }; |
| 46 | |
| 47 | } // namespace shill |
| 48 | |
| 49 | #endif // SHILL_MOCK_WIFI_ |