Jason Glasgow | 1452187 | 2012-05-07 19:12:15 -0400 | [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 | |
Ben Chan | c54afe5 | 2014-11-05 10:28:08 -0800 | [diff] [blame] | 5 | #ifndef SHILL_CELLULAR_MOCK_CELLULAR_SERVICE_H_ |
| 6 | #define SHILL_CELLULAR_MOCK_CELLULAR_SERVICE_H_ |
Jason Glasgow | 1452187 | 2012-05-07 19:12:15 -0400 | [diff] [blame] | 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <gmock/gmock.h> |
| 11 | |
Ben Chan | c54afe5 | 2014-11-05 10:28:08 -0800 | [diff] [blame] | 12 | #include "shill/cellular/cellular_service.h" |
Jason Glasgow | 1452187 | 2012-05-07 19:12:15 -0400 | [diff] [blame] | 13 | |
| 14 | namespace shill { |
| 15 | |
| 16 | class MockCellularService : public CellularService { |
| 17 | public: |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame^] | 18 | MockCellularService(ModemInfo* modem_info, |
| 19 | const CellularRefPtr& device); |
Ben Chan | 5ea763b | 2014-08-13 11:07:54 -0700 | [diff] [blame] | 20 | ~MockCellularService() override; |
Jason Glasgow | 1452187 | 2012-05-07 19:12:15 -0400 | [diff] [blame] | 21 | |
Arman Uguray | c7b1560 | 2013-02-16 00:56:18 -0800 | [diff] [blame] | 22 | MOCK_METHOD0(AutoConnect, void()); |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame^] | 23 | MOCK_METHOD1(SetLastGoodApn, void(const Stringmap& apn_info)); |
Jason Glasgow | 1452187 | 2012-05-07 19:12:15 -0400 | [diff] [blame] | 24 | MOCK_METHOD0(ClearLastGoodApn, void()); |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame^] | 25 | 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 agrawal | 0381f9a | 2013-07-11 16:41:52 -0700 | [diff] [blame] | 28 | MOCK_METHOD1(SetState, void(ConnectState state)); |
| 29 | MOCK_METHOD1(SetFailure, void(ConnectFailure failure)); |
| 30 | MOCK_METHOD1(SetFailureSilent, void(ConnectFailure failure)); |
Thieu Le | 43ce4d4 | 2013-10-04 16:08:55 -0700 | [diff] [blame] | 31 | MOCK_CONST_METHOD0(state, ConnectState()); |
| 32 | MOCK_CONST_METHOD0(explicitly_disconnected, bool()); |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame^] | 33 | MOCK_CONST_METHOD0(activation_state, const std::string&()); |
| 34 | MOCK_CONST_METHOD0(resume_start_time, const base::Time&()); |
Jason Glasgow | 1452187 | 2012-05-07 19:12:15 -0400 | [diff] [blame] | 35 | |
| 36 | private: |
Thieu Le | 247416e | 2014-02-25 18:19:53 -0800 | [diff] [blame] | 37 | std::string default_activation_state_; |
| 38 | |
Jason Glasgow | 1452187 | 2012-05-07 19:12:15 -0400 | [diff] [blame] | 39 | DISALLOW_COPY_AND_ASSIGN(MockCellularService); |
| 40 | }; |
| 41 | |
| 42 | } // namespace shill |
| 43 | |
Ben Chan | c54afe5 | 2014-11-05 10:28:08 -0800 | [diff] [blame] | 44 | #endif // SHILL_CELLULAR_MOCK_CELLULAR_SERVICE_H_ |