blob: f34f4ca402f56cb493ff4f039c53e39e97de3cab [file] [log] [blame]
Peter Qiuc0beca52015-09-03 11:25:46 -07001//
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 Stewart9413bcc2013-04-04 16:12:43 -070016
Ben Chan87602512014-11-07 20:50:05 -080017#ifndef SHILL_ETHERNET_MOCK_ETHERNET_SERVICE_H_
18#define SHILL_ETHERNET_MOCK_ETHERNET_SERVICE_H_
Paul Stewart9413bcc2013-04-04 16:12:43 -070019
Alex Vakulenko8a532292014-06-16 17:18:44 -070020#include <string>
21
Paul Stewart9413bcc2013-04-04 16:12:43 -070022#include <gmock/gmock.h>
23
Ben Chan87602512014-11-07 20:50:05 -080024#include "shill/ethernet/ethernet_service.h"
Paul Stewart9413bcc2013-04-04 16:12:43 -070025
26namespace shill {
27
28class MockEthernetService : public EthernetService {
29 public:
Paul Stewart7e779d82015-06-16 13:13:10 -070030 MockEthernetService(ControlInterface* control_interface, Metrics* metrics,
Paul Stewart3de88a02014-12-05 07:55:14 -080031 base::WeakPtr<Ethernet> ethernet);
Ben Chan5ea763b2014-08-13 11:07:54 -070032 ~MockEthernetService() override;
Paul Stewart9413bcc2013-04-04 16:12:43 -070033
Paul Stewart7e779d82015-06-16 13:13:10 -070034 MOCK_METHOD2(AddEAPCertification, bool(const std::string& name,
Paul Stewart9413bcc2013-04-04 16:12:43 -070035 size_t depth));
Alex Vakulenko8a532292014-06-16 17:18:44 -070036 MOCK_METHOD0(ClearEAPCertification, void());
Paul Stewart7e779d82015-06-16 13:13:10 -070037 MOCK_METHOD2(Configure, void(const KeyValueStore& args, Error* error));
38 MOCK_METHOD2(Disconnect, void(Error* error, const char* reason));
Samuel Tan0d061192014-07-07 15:45:15 -070039 MOCK_METHOD3(DisconnectWithFailure,
Paul Stewart7e779d82015-06-16 13:13:10 -070040 void(ConnectFailure failure, Error* error, const char* reason));
41 MOCK_CONST_METHOD1(GetDeviceRpcId, std::string(Error* error));
Paul Stewart9413bcc2013-04-04 16:12:43 -070042 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 Stewart3de88a02014-12-05 07:55:14 -080050 MOCK_METHOD0(OnVisibilityChanged, void());
Garret Kelly65a56722015-02-03 14:48:25 -050051 MOCK_CONST_METHOD0(technology, Technology::Identifier());
Paul Stewart9413bcc2013-04-04 16:12:43 -070052
53 private:
54 DISALLOW_COPY_AND_ASSIGN(MockEthernetService);
55};
56
57} // namespace shill
58
Ben Chan87602512014-11-07 20:50:05 -080059#endif // SHILL_ETHERNET_MOCK_ETHERNET_SERVICE_H_