Paul Stewart | ac1328e | 2012-07-20 11:55:40 -0700 | [diff] [blame] | 1 | // 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_ARP_CLIENT_H_ |
| 6 | #define SHILL_MOCK_ARP_CLIENT_H_ |
| 7 | |
| 8 | #include "shill/arp_client.h" |
| 9 | |
| 10 | #include <gmock/gmock.h> |
| 11 | |
| 12 | #include "shill/arp_packet.h" |
| 13 | #include "shill/byte_string.h" |
| 14 | |
| 15 | namespace shill { |
| 16 | |
| 17 | class MockArpClient : public ArpClient { |
| 18 | public: |
| 19 | MockArpClient(); |
| 20 | virtual ~MockArpClient(); |
| 21 | |
| 22 | MOCK_METHOD0(Start, bool()); |
| 23 | MOCK_METHOD0(Stop, void()); |
| 24 | MOCK_CONST_METHOD2(ReceiveReply, bool(ArpPacket *packet, ByteString *sender)); |
| 25 | MOCK_CONST_METHOD1(TransmitRequest, bool(const ArpPacket &packet)); |
| 26 | MOCK_CONST_METHOD0(socket, int()); |
| 27 | |
| 28 | private: |
| 29 | DISALLOW_COPY_AND_ASSIGN(MockArpClient); |
| 30 | }; |
| 31 | |
| 32 | } // namespace shill |
| 33 | |
| 34 | #endif // SHILL_MOCK_ARP_CLIENT_H_ |