Prathmesh Prabhu | 95afcbb | 2014-04-08 16:05:42 -0700 | [diff] [blame] | 1 | // Copyright (c) 2014 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_MOBILE_OPERATOR_INFO_H_ |
| 6 | #define SHILL_CELLULAR_MOCK_MOBILE_OPERATOR_INFO_H_ |
Prathmesh Prabhu | 95afcbb | 2014-04-08 16:05:42 -0700 | [diff] [blame] | 7 | |
| 8 | #include <string> |
Prathmesh Prabhu | 92df619 | 2014-04-29 18:08:08 -0700 | [diff] [blame] | 9 | #include <vector> |
Prathmesh Prabhu | 95afcbb | 2014-04-08 16:05:42 -0700 | [diff] [blame] | 10 | |
| 11 | #include <gmock/gmock.h> |
| 12 | |
Ben Chan | c54afe5 | 2014-11-05 10:28:08 -0800 | [diff] [blame] | 13 | #include "shill/cellular/mobile_operator_info.h" |
Prathmesh Prabhu | 95afcbb | 2014-04-08 16:05:42 -0700 | [diff] [blame] | 14 | |
| 15 | using testing::ReturnRef; |
| 16 | |
| 17 | namespace shill { |
| 18 | |
| 19 | class MockMobileOperatorInfo : public MobileOperatorInfo { |
| 20 | public: |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame^] | 21 | MockMobileOperatorInfo(EventDispatcher* dispatcher, |
| 22 | const std::string& info_owner); |
Ben Chan | 5ea763b | 2014-08-13 11:07:54 -0700 | [diff] [blame] | 23 | ~MockMobileOperatorInfo() override; |
Prathmesh Prabhu | 95afcbb | 2014-04-08 16:05:42 -0700 | [diff] [blame] | 24 | |
| 25 | MOCK_CONST_METHOD0(IsMobileNetworkOperatorKnown, bool()); |
| 26 | |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame^] | 27 | MOCK_CONST_METHOD0(mccmnc, const std::string&()); |
Prathmesh Prabhu | 92df619 | 2014-04-29 18:08:08 -0700 | [diff] [blame] | 28 | MOCK_CONST_METHOD0(olp_list, |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame^] | 29 | const std::vector<MobileOperatorInfo::OnlinePortal>&()); |
| 30 | MOCK_CONST_METHOD0(activation_code, const std::string&()); |
| 31 | MOCK_CONST_METHOD0(operator_name, const std::string&()); |
| 32 | MOCK_CONST_METHOD0(country, const std::string&()); |
| 33 | MOCK_CONST_METHOD0(uuid, const std::string&()); |
Prathmesh Prabhu | 95afcbb | 2014-04-08 16:05:42 -0700 | [diff] [blame] | 34 | |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame^] | 35 | MOCK_METHOD1(UpdateMCCMNC, void(const std::string&)); |
| 36 | MOCK_METHOD1(UpdateSID, void(const std::string&)); |
| 37 | MOCK_METHOD1(UpdateIMSI, void(const std::string&)); |
| 38 | MOCK_METHOD1(UpdateNID, void(const std::string&)); |
| 39 | MOCK_METHOD1(UpdateOperatorName, void(const std::string&)); |
Prathmesh Prabhu | 6e0a8ef | 2014-05-05 22:30:07 -0700 | [diff] [blame] | 40 | |
Prathmesh Prabhu | 95afcbb | 2014-04-08 16:05:42 -0700 | [diff] [blame] | 41 | // Sets up the mock object to return empty strings/vectors etc for all |
| 42 | // propeties. |
| 43 | void SetEmptyDefaultsForProperties(); |
| 44 | |
| 45 | private: |
| 46 | std::string empty_mccmnc_; |
Prathmesh Prabhu | 92df619 | 2014-04-29 18:08:08 -0700 | [diff] [blame] | 47 | std::vector<MobileOperatorInfo::OnlinePortal> empty_olp_list_; |
Prathmesh Prabhu | f228821 | 2014-05-21 19:19:19 -0700 | [diff] [blame] | 48 | std::string empty_activation_code_; |
Prathmesh Prabhu | 95afcbb | 2014-04-08 16:05:42 -0700 | [diff] [blame] | 49 | std::string empty_operator_name_; |
Prathmesh Prabhu | 6e0a8ef | 2014-05-05 22:30:07 -0700 | [diff] [blame] | 50 | std::string empty_country_; |
Prathmesh Prabhu | 401a5b9 | 2014-04-29 17:37:55 -0700 | [diff] [blame] | 51 | std::string empty_uuid_; |
Prathmesh Prabhu | 95afcbb | 2014-04-08 16:05:42 -0700 | [diff] [blame] | 52 | }; |
| 53 | |
| 54 | } // namespace shill |
| 55 | |
Ben Chan | c54afe5 | 2014-11-05 10:28:08 -0800 | [diff] [blame] | 56 | #endif // SHILL_CELLULAR_MOCK_MOBILE_OPERATOR_INFO_H_ |