Darin Petkov | 33af05c | 2012-02-28 10:10:30 +0100 | [diff] [blame] | 1 | // Copyright (c) 2012 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_VPN_DRIVER_ |
| 6 | #define SHILL_MOCK_VPN_DRIVER_ |
| 7 | |
| 8 | #include <gmock/gmock.h> |
| 9 | |
| 10 | #include "shill/vpn_driver.h" |
| 11 | |
| 12 | namespace shill { |
| 13 | |
| 14 | class MockVPNDriver : public VPNDriver { |
| 15 | public: |
| 16 | MockVPNDriver(); |
| 17 | virtual ~MockVPNDriver(); |
| 18 | |
Paul Stewart | ca6abd4 | 2012-03-01 15:45:29 -0800 | [diff] [blame] | 19 | MOCK_METHOD2(ClaimInterface, bool(const std::string &link_name, |
| 20 | int interface_index)); |
Darin Petkov | 79d74c9 | 2012-03-07 17:20:32 +0100 | [diff] [blame] | 21 | MOCK_METHOD2(Connect, void(const VPNServiceRefPtr &service, Error *error)); |
Darin Petkov | 6aa2187 | 2012-03-09 16:10:19 +0100 | [diff] [blame] | 22 | MOCK_METHOD0(Disconnect, void()); |
Darin Petkov | f3c71d7 | 2012-03-21 12:32:15 +0100 | [diff] [blame] | 23 | MOCK_METHOD2(Load, bool(StoreInterface *storage, |
| 24 | const std::string &storage_id)); |
Darin Petkov | cb71529 | 2012-04-25 13:04:37 +0200 | [diff] [blame] | 25 | MOCK_METHOD3(Save, bool(StoreInterface *storage, |
| 26 | const std::string &storage_id, |
| 27 | bool save_credentials)); |
| 28 | MOCK_METHOD0(UnloadCredentials, void()); |
Paul Stewart | ebd3856 | 2012-03-23 13:06:40 -0700 | [diff] [blame] | 29 | MOCK_METHOD1(InitPropertyStore, void(PropertyStore *store)); |
Paul Stewart | 39964fa | 2012-04-04 09:50:25 -0700 | [diff] [blame] | 30 | MOCK_CONST_METHOD0(GetProviderType, std::string()); |
Darin Petkov | 79d74c9 | 2012-03-07 17:20:32 +0100 | [diff] [blame] | 31 | |
| 32 | private: |
| 33 | DISALLOW_COPY_AND_ASSIGN(MockVPNDriver); |
Darin Petkov | 33af05c | 2012-02-28 10:10:30 +0100 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | } // namespace shill |
| 37 | |
| 38 | #endif // SHILL_MOCK_VPN_DRIVER_ |