Paul Stewart | dd60e45 | 2011-08-08 11:38:36 -0700 | [diff] [blame] | 1 | // Copyright (c) 2011 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_ROUTING_TABLE_H_ |
| 6 | #define SHILL_MOCK_ROUTING_TABLE_H_ |
| 7 | |
| 8 | #include <gmock/gmock.h> |
| 9 | |
| 10 | #include "shill/routing_table.h" |
| 11 | |
| 12 | namespace shill { |
| 13 | |
| 14 | class MockRoutingTable : public RoutingTable { |
| 15 | public: |
| 16 | MOCK_METHOD0(Start, void()); |
| 17 | MOCK_METHOD0(Stop, void()); |
| 18 | MOCK_METHOD2(AddRoute, bool(int interface_index, |
| 19 | const RoutingTableEntry &entry)); |
| 20 | MOCK_METHOD3(GetDefaultRoute, bool(int interface_index, |
| 21 | IPAddress::Family family, |
| 22 | RoutingTableEntry *entry)); |
| 23 | MOCK_METHOD3(SetDefaultRoute, bool(int interface_index, |
| 24 | const IPConfigRefPtr &ipconfig, |
| 25 | uint32 metric)); |
| 26 | MOCK_METHOD1(FlushRoutes, void(int interface_index)); |
| 27 | MOCK_METHOD1(ResetTable, void(int interface_index)); |
| 28 | MOCK_METHOD2(SetDefaultMetric, void(int interface_index, uint32 metric)); |
| 29 | }; |
| 30 | |
| 31 | } // namespace shill |
| 32 | |
| 33 | #endif // SHILL_MOCK_ROUTING_TABLE_H_ |