Paul Stewart | f65320c | 2011-10-13 14:34:52 -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_DNS_CLIENT_H_ |
| 6 | #define SHILL_MOCK_DNS_CLIENT_H_ |
| 7 | |
| 8 | #include "shill/dns_client.h" |
| 9 | |
| 10 | #include <base/basictypes.h> |
| 11 | #include <gmock/gmock.h> |
| 12 | |
| 13 | namespace shill { |
| 14 | |
| 15 | class MockDNSClient : public DNSClient { |
| 16 | public: |
| 17 | MockDNSClient(); |
| 18 | virtual ~MockDNSClient(); |
| 19 | |
| 20 | MOCK_METHOD1(Start, bool(const std::string &hostname)); |
| 21 | MOCK_METHOD0(Stop, void()); |
| 22 | MOCK_CONST_METHOD0(address, const IPAddress &()); |
| 23 | MOCK_CONST_METHOD0(error, const std::string &()); |
| 24 | |
| 25 | private: |
| 26 | DISALLOW_COPY_AND_ASSIGN(MockDNSClient); |
| 27 | }; |
| 28 | |
| 29 | } // namespace shill |
| 30 | |
| 31 | #endif // SHILL_MOCK_DNS_CLIENT_H_ |