summaryrefslogtreecommitdiff
path: root/mock_rtnl_handler.h
blob: d08299ad232923f37831fb06cf6cbdb20c6cd43f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SHILL_MOCK_RTNL_HANDLER_H_
#define SHILL_MOCK_RTNL_HANDLER_H_

#include <gmock/gmock.h>

#include "shill/rtnl_handler.h"

namespace shill {

class MockRTNLHandler : public RTNLHandler {
 public:
  MOCK_METHOD2(Start, void(EventDispatcher *dispatcher, Sockets *sockets));
  MOCK_METHOD1(AddListener, void(RTNLListener *to_add));
  MOCK_METHOD1(RemoveListener, void(RTNLListener *to_remove));
  MOCK_METHOD3(SetInterfaceFlags, void(int interface_index,
                                       unsigned int flags,
                                       unsigned int change));
  MOCK_METHOD2(AddInterfaceAddress, bool(int interface_index,
                                         const IPConfig &config));
  MOCK_METHOD2(RemoveInterfaceAddress, bool(int interface_index,
                                            const IPConfig &config));
  MOCK_METHOD1(RequestDump, void(int request_flags));
  MOCK_METHOD1(GetInterfaceIndex, int(const std::string &interface_name));
  MOCK_METHOD1(SendMessage, bool(RTNLMessage *message));
};

}  // namespace shill

#endif  // SHILL_MOCK_RTNL_HANDLER_H_