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_RESOLVER_H_ |
| 6 | #define SHILL_MOCK_RESOLVER_H_ |
| 7 | |
Darin Petkov | eac68e6 | 2011-08-26 16:24:51 -0700 | [diff] [blame] | 8 | #include <base/basictypes.h> |
Paul Stewart | dd60e45 | 2011-08-08 11:38:36 -0700 | [diff] [blame] | 9 | #include <gmock/gmock.h> |
| 10 | |
| 11 | #include "shill/resolver.h" |
| 12 | |
| 13 | namespace shill { |
| 14 | |
| 15 | class MockResolver : public Resolver { |
| 16 | public: |
Darin Petkov | eac68e6 | 2011-08-26 16:24:51 -0700 | [diff] [blame] | 17 | MockResolver(); |
| 18 | virtual ~MockResolver(); |
| 19 | |
Paul Stewart | dd60e45 | 2011-08-08 11:38:36 -0700 | [diff] [blame] | 20 | MOCK_METHOD1(SetDNSFromIPConfig, bool(const IPConfigRefPtr &ipconfig)); |
| 21 | MOCK_METHOD2(SetDNSFromLists, |
| 22 | bool(const std::vector<std::string> &dns_servers, |
| 23 | const std::vector<std::string> &domain_search)); |
| 24 | MOCK_METHOD0(ClearDNS, bool()); |
Darin Petkov | eac68e6 | 2011-08-26 16:24:51 -0700 | [diff] [blame] | 25 | |
| 26 | private: |
| 27 | DISALLOW_COPY_AND_ASSIGN(MockResolver); |
Paul Stewart | dd60e45 | 2011-08-08 11:38:36 -0700 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | } // namespace shill |
| 31 | |
| 32 | #endif // SHILL_MOCK_RESOLVER_H_ |