blob: f6fd56627c8c6cc827c217ccd9ad0e1e9811d1aa [file] [log] [blame]
Jason Glasgow14521872012-05-07 19:12:15 -04001// 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
Ben Chanc54afe52014-11-05 10:28:08 -08005#ifndef SHILL_CELLULAR_MOCK_CELLULAR_SERVICE_H_
6#define SHILL_CELLULAR_MOCK_CELLULAR_SERVICE_H_
Jason Glasgow14521872012-05-07 19:12:15 -04007
8#include <string>
9
10#include <gmock/gmock.h>
11
Ben Chanc54afe52014-11-05 10:28:08 -080012#include "shill/cellular/cellular_service.h"
Jason Glasgow14521872012-05-07 19:12:15 -040013
14namespace shill {
15
16class MockCellularService : public CellularService {
17 public:
Paul Stewart2f6c7892015-06-16 13:13:10 -070018 MockCellularService(ModemInfo* modem_info,
19 const CellularRefPtr& device);
Ben Chan5ea763b2014-08-13 11:07:54 -070020 ~MockCellularService() override;
Jason Glasgow14521872012-05-07 19:12:15 -040021
Arman Ugurayc7b15602013-02-16 00:56:18 -080022 MOCK_METHOD0(AutoConnect, void());
Paul Stewart2f6c7892015-06-16 13:13:10 -070023 MOCK_METHOD1(SetLastGoodApn, void(const Stringmap& apn_info));
Jason Glasgow14521872012-05-07 19:12:15 -040024 MOCK_METHOD0(ClearLastGoodApn, void());
Paul Stewart2f6c7892015-06-16 13:13:10 -070025 MOCK_METHOD1(SetActivationState, void(const std::string& state));
26 MOCK_METHOD2(Connect, void(Error* error, const char* reason));
27 MOCK_METHOD2(Disconnect, void(Error* error, const char* reason));
mukesh agrawal0381f9a2013-07-11 16:41:52 -070028 MOCK_METHOD1(SetState, void(ConnectState state));
29 MOCK_METHOD1(SetFailure, void(ConnectFailure failure));
30 MOCK_METHOD1(SetFailureSilent, void(ConnectFailure failure));
Thieu Le43ce4d42013-10-04 16:08:55 -070031 MOCK_CONST_METHOD0(state, ConnectState());
32 MOCK_CONST_METHOD0(explicitly_disconnected, bool());
Paul Stewart2f6c7892015-06-16 13:13:10 -070033 MOCK_CONST_METHOD0(activation_state, const std::string&());
34 MOCK_CONST_METHOD0(resume_start_time, const base::Time&());
Jason Glasgow14521872012-05-07 19:12:15 -040035
36 private:
Thieu Le247416e2014-02-25 18:19:53 -080037 std::string default_activation_state_;
38
Jason Glasgow14521872012-05-07 19:12:15 -040039 DISALLOW_COPY_AND_ASSIGN(MockCellularService);
40};
41
42} // namespace shill
43
Ben Chanc54afe52014-11-05 10:28:08 -080044#endif // SHILL_CELLULAR_MOCK_CELLULAR_SERVICE_H_