• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef MOCK_ESIM_MANAGER_H
16 #define MOCK_ESIM_MANAGER_H
17 
18 #include "i_esim_manager.h"
19 #include <gmock/gmock.h>
20 namespace OHOS {
21 namespace Telephony {
22 class MockEsimManager : public IEsimManager {
23 public:
24     MockEsimManager() = default;
25     virtual ~MockEsimManager() = default;
26     MOCK_METHOD1(OnInit, bool(int32_t));
27     MOCK_METHOD2(GetEid, int32_t(int32_t, std::u16string &));
28     MOCK_METHOD2(GetEuiccProfileInfoList, int32_t(int32_t, GetEuiccProfileInfoListInnerResult &));
29     MOCK_METHOD2(GetEuiccInfo, int32_t(int32_t, EuiccInfo &));
30     MOCK_METHOD5(DisableProfile, int32_t(int32_t, int32_t, const std::u16string &, bool, int32_t &));
31     MOCK_METHOD3(GetSmdsAddress, int32_t(int32_t, int32_t, std::u16string &));
32     MOCK_METHOD3(GetRulesAuthTable, int32_t(int32_t, int32_t, EuiccRulesAuthTable &));
33     MOCK_METHOD3(GetEuiccChallenge, int32_t(int32_t, int32_t, ResponseEsimInnerResult &));
34     MOCK_METHOD2(GetDefaultSmdpAddress, int32_t(int32_t, std::u16string &));
35     MOCK_METHOD4(CancelSession, int32_t(int32_t, const std::u16string &, CancelReason, ResponseEsimInnerResult &));
36     MOCK_METHOD4(GetProfile, int32_t(int32_t, int32_t, const std::u16string &, EuiccProfile &));
37     MOCK_METHOD3(ResetMemory, int32_t(int32_t, ResetOption, int32_t &));
38     MOCK_METHOD3(SetDefaultSmdpAddress, int32_t(int32_t, const std::u16string &, int32_t &));
39     MOCK_METHOD1(IsSupported, bool(int32_t));
40     MOCK_METHOD4(SendApduData,
41                  int32_t(int32_t, const std::u16string &, const EsimApduData &, ResponseEsimInnerResult &));
42     MOCK_METHOD3(PrepareDownload, int32_t(int32_t, const DownLoadConfigInfo &, ResponseEsimInnerResult &));
43     MOCK_METHOD4(LoadBoundProfilePackage, int32_t(int32_t, int32_t, const std::u16string &, ResponseEsimBppResult &));
44     MOCK_METHOD4(ListNotifications, int32_t(int32_t, int32_t, EsimEvent, EuiccNotificationList &));
45     MOCK_METHOD4(RetrieveNotificationList, int32_t(int32_t, int32_t, EsimEvent, EuiccNotificationList &));
46     MOCK_METHOD4(RetrieveNotification, int32_t(int32_t, int32_t, int32_t, EuiccNotification &));
47     MOCK_METHOD4(RemoveNotificationFromList, int32_t(int32_t, int32_t, int32_t, int32_t &));
48     MOCK_METHOD3(DeleteProfile, int32_t(int32_t, const std::u16string &, int32_t &));
49     MOCK_METHOD5(SwitchToProfile, int32_t(int32_t, int32_t, const std::u16string &, bool, int32_t &));
50     MOCK_METHOD4(SetProfileNickname, int32_t(int32_t, const std::u16string &, const std::u16string &, int32_t &));
51     MOCK_METHOD3(GetEuiccInfo2, int32_t(int32_t, int32_t, EuiccInfo2 &));
52     MOCK_METHOD3(AuthenticateServer, int32_t(int32_t, const AuthenticateConfigInfo &, ResponseEsimInnerResult &));
53     MOCK_METHOD3(GetContractInfo, int32_t(int32_t, const GetContractInfoRequest &, std::string &));
54 };
55 } // Telephony
56 } // OHOS
57 #endif // MOCK_ESIM_MANAGER_H
58