Peter Qiu | c0beca5 | 2015-09-03 11:25:46 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2013 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
Paul Stewart | 9413bcc | 2013-04-04 16:12:43 -0700 | [diff] [blame] | 16 | |
Ben Chan | 8760251 | 2014-11-07 20:50:05 -0800 | [diff] [blame] | 17 | #ifndef SHILL_ETHERNET_MOCK_ETHERNET_SERVICE_H_ |
| 18 | #define SHILL_ETHERNET_MOCK_ETHERNET_SERVICE_H_ |
Paul Stewart | 9413bcc | 2013-04-04 16:12:43 -0700 | [diff] [blame] | 19 | |
Alex Vakulenko | 8a53229 | 2014-06-16 17:18:44 -0700 | [diff] [blame] | 20 | #include <string> |
| 21 | |
Paul Stewart | 9413bcc | 2013-04-04 16:12:43 -0700 | [diff] [blame] | 22 | #include <gmock/gmock.h> |
| 23 | |
Ben Chan | 8760251 | 2014-11-07 20:50:05 -0800 | [diff] [blame] | 24 | #include "shill/ethernet/ethernet_service.h" |
Paul Stewart | 9413bcc | 2013-04-04 16:12:43 -0700 | [diff] [blame] | 25 | |
| 26 | namespace shill { |
| 27 | |
| 28 | class MockEthernetService : public EthernetService { |
| 29 | public: |
Paul Stewart | 7e779d8 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 30 | MockEthernetService(ControlInterface* control_interface, Metrics* metrics, |
Paul Stewart | 3de88a0 | 2014-12-05 07:55:14 -0800 | [diff] [blame] | 31 | base::WeakPtr<Ethernet> ethernet); |
Ben Chan | 5ea763b | 2014-08-13 11:07:54 -0700 | [diff] [blame] | 32 | ~MockEthernetService() override; |
Paul Stewart | 9413bcc | 2013-04-04 16:12:43 -0700 | [diff] [blame] | 33 | |
Paul Stewart | 7e779d8 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 34 | MOCK_METHOD2(AddEAPCertification, bool(const std::string& name, |
Paul Stewart | 9413bcc | 2013-04-04 16:12:43 -0700 | [diff] [blame] | 35 | size_t depth)); |
Alex Vakulenko | 8a53229 | 2014-06-16 17:18:44 -0700 | [diff] [blame] | 36 | MOCK_METHOD0(ClearEAPCertification, void()); |
Paul Stewart | 7e779d8 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 37 | MOCK_METHOD2(Configure, void(const KeyValueStore& args, Error* error)); |
| 38 | MOCK_METHOD2(Disconnect, void(Error* error, const char* reason)); |
Samuel Tan | 0d06119 | 2014-07-07 15:45:15 -0700 | [diff] [blame] | 39 | MOCK_METHOD3(DisconnectWithFailure, |
Paul Stewart | 7e779d8 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 40 | void(ConnectFailure failure, Error* error, const char* reason)); |
| 41 | MOCK_CONST_METHOD1(GetDeviceRpcId, std::string(Error* error)); |
Paul Stewart | 9413bcc | 2013-04-04 16:12:43 -0700 | [diff] [blame] | 42 | MOCK_CONST_METHOD0(GetStorageIdentifier, std::string()); |
| 43 | MOCK_CONST_METHOD0(Is8021xConnectable, bool()); |
| 44 | MOCK_CONST_METHOD0(IsConnected, bool()); |
| 45 | MOCK_CONST_METHOD0(IsConnecting, bool()); |
| 46 | MOCK_CONST_METHOD0(IsRemembered, bool()); |
| 47 | MOCK_METHOD1(SetFailure, void(ConnectFailure failure)); |
| 48 | MOCK_METHOD1(SetFailureSilent, void(ConnectFailure failure)); |
| 49 | MOCK_METHOD1(SetState, void(ConnectState state)); |
Paul Stewart | 3de88a0 | 2014-12-05 07:55:14 -0800 | [diff] [blame] | 50 | MOCK_METHOD0(OnVisibilityChanged, void()); |
Garret Kelly | 65a5672 | 2015-02-03 14:48:25 -0500 | [diff] [blame] | 51 | MOCK_CONST_METHOD0(technology, Technology::Identifier()); |
Paul Stewart | 9413bcc | 2013-04-04 16:12:43 -0700 | [diff] [blame] | 52 | |
| 53 | private: |
| 54 | DISALLOW_COPY_AND_ASSIGN(MockEthernetService); |
| 55 | }; |
| 56 | |
| 57 | } // namespace shill |
| 58 | |
Ben Chan | 8760251 | 2014-11-07 20:50:05 -0800 | [diff] [blame] | 59 | #endif // SHILL_ETHERNET_MOCK_ETHERNET_SERVICE_H_ |