Paul Stewart | c681fa0 | 2012-03-02 19:40:04 -0800 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
Paul Stewart | c1dec4d | 2011-12-08 15:25:28 -0800 | [diff] [blame] | 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_CONNECTION_H_ |
| 6 | #define SHILL_MOCK_CONNECTION_H_ |
| 7 | |
| 8 | #include <base/basictypes.h> |
| 9 | #include <gmock/gmock.h> |
| 10 | |
| 11 | #include "shill/connection.h" |
| 12 | |
| 13 | namespace shill { |
| 14 | |
| 15 | class MockConnection : public Connection { |
| 16 | public: |
| 17 | MockConnection(const DeviceInfo *device_info); |
| 18 | virtual ~MockConnection(); |
| 19 | |
| 20 | MOCK_METHOD1(UpdateFromIPConfig, void(const IPConfigRefPtr &config)); |
Paul Stewart | c681fa0 | 2012-03-02 19:40:04 -0800 | [diff] [blame] | 21 | MOCK_CONST_METHOD0(is_default, bool()); |
Paul Stewart | c1dec4d | 2011-12-08 15:25:28 -0800 | [diff] [blame] | 22 | MOCK_METHOD1(SetIsDefault, void(bool is_default)); |
Paul Stewart | 10241e3 | 2012-04-23 18:15:06 -0700 | [diff] [blame] | 23 | MOCK_CONST_METHOD0(ipconfig_rpc_identifier, const std::string &()); |
Paul Stewart | c8f4bef | 2011-12-13 09:45:51 -0800 | [diff] [blame] | 24 | MOCK_METHOD0(RequestRouting, void()); |
| 25 | MOCK_METHOD0(ReleaseRouting, void()); |
| 26 | MOCK_CONST_METHOD0(interface_name, const std::string &()); |
| 27 | MOCK_CONST_METHOD0(dns_servers, const std::vector<std::string> &()); |
Paul Stewart | ce4ec19 | 2012-03-14 12:53:46 -0700 | [diff] [blame] | 28 | MOCK_METHOD1(RequestHostRoute, bool(const IPAddress &destination)); |
Paul Stewart | c1dec4d | 2011-12-08 15:25:28 -0800 | [diff] [blame] | 29 | |
| 30 | private: |
| 31 | DISALLOW_COPY_AND_ASSIGN(MockConnection); |
| 32 | }; |
| 33 | |
| 34 | } // namespace shill |
| 35 | |
| 36 | #endif // SHILL_MOCK_CONNECTION_H_ |