blob: e041e059b92a4dd5a20e93f2257263af4b7226aa [file] [log] [blame]
Paul Stewartc681fa02012-03-02 19:40:04 -08001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Paul Stewartc1dec4d2011-12-08 15:25:28 -08002// 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
Alex Vakulenko8a532292014-06-16 17:18:44 -07008#include <string>
9#include <vector>
10
Paul Stewartc1dec4d2011-12-08 15:25:28 -080011#include <base/basictypes.h>
12#include <gmock/gmock.h>
13
14#include "shill/connection.h"
15
16namespace shill {
17
18class MockConnection : public Connection {
19 public:
Alex Vakulenko8a532292014-06-16 17:18:44 -070020 explicit MockConnection(const DeviceInfo *device_info);
Paul Stewartc1dec4d2011-12-08 15:25:28 -080021 virtual ~MockConnection();
22
23 MOCK_METHOD1(UpdateFromIPConfig, void(const IPConfigRefPtr &config));
Paul Stewartdf3c0a82012-11-09 15:54:33 -080024 MOCK_CONST_METHOD0(GetLowerConnection, ConnectionRefPtr());
Paul Stewartc681fa02012-03-02 19:40:04 -080025 MOCK_CONST_METHOD0(is_default, bool());
Paul Stewartc1dec4d2011-12-08 15:25:28 -080026 MOCK_METHOD1(SetIsDefault, void(bool is_default));
Paul Stewart10241e32012-04-23 18:15:06 -070027 MOCK_CONST_METHOD0(ipconfig_rpc_identifier, const std::string &());
Paul Stewartc8f4bef2011-12-13 09:45:51 -080028 MOCK_METHOD0(RequestRouting, void());
29 MOCK_METHOD0(ReleaseRouting, void());
30 MOCK_CONST_METHOD0(interface_name, const std::string &());
31 MOCK_CONST_METHOD0(dns_servers, const std::vector<std::string> &());
Paul Stewartce4ec192012-03-14 12:53:46 -070032 MOCK_METHOD1(RequestHostRoute, bool(const IPAddress &destination));
Paul Stewart6c72c972012-07-27 11:29:20 -070033 MOCK_CONST_METHOD0(local, const IPAddress &());
34 MOCK_CONST_METHOD0(gateway, const IPAddress &());
Alex Deymofddc09a2013-07-03 18:41:31 -070035 MOCK_CONST_METHOD0(technology, Technology::Identifier());
Paul Stewart4a6748d2012-07-17 14:31:36 -070036 MOCK_METHOD0(CreateGatewayRoute, bool());
Alex Deymofddc09a2013-07-03 18:41:31 -070037 MOCK_METHOD0(GetCarrierConnection, ConnectionRefPtr());
Paul Stewart7f5d9c02013-12-03 18:26:00 -080038 MOCK_CONST_METHOD0(tethering, std::string &());
Paul Stewartc1dec4d2011-12-08 15:25:28 -080039
40 private:
41 DISALLOW_COPY_AND_ASSIGN(MockConnection);
42};
43
44} // namespace shill
45
46#endif // SHILL_MOCK_CONNECTION_H_