mukesh agrawal | 23ac6b7 | 2013-01-31 18:52:37 -0800 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
Paul Stewart | dd60e45 | 2011-08-08 11:38:36 -0700 | [diff] [blame] | 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 | |
Hristo Stefanov | ed2c28c | 2011-11-29 15:37:30 -0800 | [diff] [blame] | 8 | #include <string> |
| 9 | #include <vector> |
| 10 | |
Darin Petkov | eac68e6 | 2011-08-26 16:24:51 -0700 | [diff] [blame] | 11 | #include <base/basictypes.h> |
Paul Stewart | dd60e45 | 2011-08-08 11:38:36 -0700 | [diff] [blame] | 12 | #include <gmock/gmock.h> |
| 13 | |
| 14 | #include "shill/resolver.h" |
| 15 | |
| 16 | namespace shill { |
| 17 | |
| 18 | class MockResolver : public Resolver { |
| 19 | public: |
Darin Petkov | eac68e6 | 2011-08-26 16:24:51 -0700 | [diff] [blame] | 20 | MockResolver(); |
| 21 | virtual ~MockResolver(); |
| 22 | |
mukesh agrawal | 23ac6b7 | 2013-01-31 18:52:37 -0800 | [diff] [blame] | 23 | MOCK_METHOD2(SetDNSFromLists, |
Paul Stewart | dd60e45 | 2011-08-08 11:38:36 -0700 | [diff] [blame] | 24 | bool(const std::vector<std::string> &dns_servers, |
mukesh agrawal | 23ac6b7 | 2013-01-31 18:52:37 -0800 | [diff] [blame] | 25 | const std::vector<std::string> &domain_search)); |
Paul Stewart | dd60e45 | 2011-08-08 11:38:36 -0700 | [diff] [blame] | 26 | MOCK_METHOD0(ClearDNS, bool()); |
Paul Stewart | 4d5efb7 | 2012-09-17 12:24:34 -0700 | [diff] [blame] | 27 | MOCK_METHOD1(set_ignored_search_list, |
| 28 | void(const std::vector<std::string> &ignored_list)); |
Darin Petkov | eac68e6 | 2011-08-26 16:24:51 -0700 | [diff] [blame] | 29 | |
| 30 | private: |
| 31 | DISALLOW_COPY_AND_ASSIGN(MockResolver); |
Paul Stewart | dd60e45 | 2011-08-08 11:38:36 -0700 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | } // namespace shill |
| 35 | |
| 36 | #endif // SHILL_MOCK_RESOLVER_H_ |