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 | |
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 | |
Paul Stewart | dd60e45 | 2011-08-08 11:38:36 -0700 | [diff] [blame] | 23 | MOCK_METHOD1(SetDNSFromIPConfig, bool(const IPConfigRefPtr &ipconfig)); |
| 24 | MOCK_METHOD2(SetDNSFromLists, |
| 25 | bool(const std::vector<std::string> &dns_servers, |
| 26 | const std::vector<std::string> &domain_search)); |
| 27 | MOCK_METHOD0(ClearDNS, bool()); |
Darin Petkov | eac68e6 | 2011-08-26 16:24:51 -0700 | [diff] [blame] | 28 | |
| 29 | private: |
| 30 | DISALLOW_COPY_AND_ASSIGN(MockResolver); |
Paul Stewart | dd60e45 | 2011-08-08 11:38:36 -0700 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | } // namespace shill |
| 34 | |
| 35 | #endif // SHILL_MOCK_RESOLVER_H_ |