blob: 6095c4978e71782a144e8ed9e44eab18b7cf1d51 [file] [log] [blame]
Wade Guthriecc53f232013-03-05 13:22:23 -08001// Copyright (c) 2012 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_NETLINK_SOCKET_H_
6#define SHILL_MOCK_NETLINK_SOCKET_H_
7
Wade Guthriefa2100e2013-05-15 10:11:22 -07008#include "shill/netlink_socket.h"
Wade Guthriecc53f232013-03-05 13:22:23 -08009
Ben Chancc67c522014-09-03 07:19:18 -070010#include <base/macros.h>
Wade Guthriecc53f232013-03-05 13:22:23 -080011
12#include <gmock/gmock.h>
13
Wade Guthriecc53f232013-03-05 13:22:23 -080014namespace shill {
15
16class ByteString;
17
18class MockNetlinkSocket : public NetlinkSocket {
19 public:
20 MockNetlinkSocket() {}
21 MOCK_METHOD0(Init, bool());
22
Ben Chan7fab8972014-08-10 17:14:46 -070023 uint32_t GetLastSequenceNumber() const { return sequence_number_; }
Wade Guthriefa2100e2013-05-15 10:11:22 -070024 MOCK_CONST_METHOD0(file_descriptor, int());
25 MOCK_METHOD1(SendMessage, bool(const ByteString &out_string));
Wade Guthriebee87c22013-03-06 11:00:46 -080026 MOCK_METHOD1(SubscribeToEvents, bool(uint32_t group_id));
Wade Guthriefa2100e2013-05-15 10:11:22 -070027 MOCK_METHOD1(RecvMessage, bool(ByteString *message));
Wade Guthriecc53f232013-03-05 13:22:23 -080028
29 private:
30 DISALLOW_COPY_AND_ASSIGN(MockNetlinkSocket);
31};
32
33} // namespace shill
34
35#endif // SHILL_MOCK_NETLINK_SOCKET_H_