• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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 
16 #include "ril_interface_test.h"
17 
18 #include "ril_callback_test.h"
19 #include "telephony_log_wrapper.h"
20 
21 namespace OHOS {
22 namespace Telephony {
23 using namespace OHOS::HDI::Ril::V1_0;
24 using namespace testing::ext;
25 const int32_t BANDWIDTH_HYSTERESIS_MS = 3000;
26 const int32_t BANDWIDTH_HYSTERESIS_KBPS = 50;
27 const int32_t MAX_UPLINK_LINK_BANDWIDTH[] = { 100, 500, 1000, 5000, 10000, 20000, 50000, 100000, 200000 };
28 const int32_t MAX_DOWNLINK_LINK_BANDWIDTH[] = { 100, // VoIP
29     500, // Web
30     1000, // SD
31     5000, // HD
32     10000, // file
33     20000, // 4K
34     50000, // LTE
35     100000,
36     200000, // 5G
37     500000, 1000000 };
38 sptr<IRil> g_rilInterface = nullptr;
39 RilCallbackTest g_callback;
40 
WaitFor(int32_t timeoutSecond)41 void WaitFor(int32_t timeoutSecond)
42 {
43     g_callback.WaitFor(WAIT_TIME_SECOND);
44 }
45 
GetBoolResult(HdiId hdiId_)46 bool GetBoolResult(HdiId hdiId_)
47 {
48     return g_callback.GetBoolResult(hdiId_);
49 }
50 
GetSerialId()51 int32_t GetSerialId()
52 {
53     return g_callback.GetSerialId();
54 }
55 
IsReady(int32_t slotId)56 bool IsReady(int32_t slotId)
57 {
58     if (g_rilInterface == nullptr) {
59         return false;
60     }
61     return g_callback.IsReady(slotId);
62 }
SetUpTestCase()63 void RilInterfaceTest::SetUpTestCase() {}
64 
TearDownTestCase()65 void RilInterfaceTest::TearDownTestCase() {}
66 
SetUp()67 void RilInterfaceTest::SetUp() {}
68 
TearDown()69 void RilInterfaceTest::TearDown() {}
70 
71 /**
72  * @tc.number   CheckRilInstanceIsEmpty
73  * @tc.name     Check whether the ril instance is empty ril instance
74  * @tc.desc     Function test
75  */
76 HWTEST_F(RilInterfaceTest, CheckRilInstanceIsEmpty, Function | MediumTest | Level1)
77 {
78     g_rilInterface = IRil::Get();
79     if (g_rilInterface == nullptr) {
80         return;
81     }
82     g_rilInterface->SetCallback(&g_callback);
83 }
84 
85 /**
86  * @tc.number   SendRilAck
87  * @tc.name     Send ril ack
88  * @tc.desc     Function test
89  */
90 HWTEST_F(RilInterfaceTest, SendRilAck, Function | MediumTest | Level1)
91 {
92     if (g_rilInterface == nullptr) {
93         return;
94     }
95     int32_t ret = g_rilInterface->SendRilAck();
96     EXPECT_EQ(SUCCESS, ret);
97 }
98 
99 /**
100  * @tc.number   Telephony_DriverSystem_GetSimStatus_V1_0100
101  * @tc.name     Get sim status
102  * @tc.desc     Function test
103  */
104 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetSimStatus_V1_0100, Function | MediumTest | Level3)
105 {
106     if (g_rilInterface == nullptr) {
107         return;
108     }
109     int32_t ret = g_rilInterface->GetSimStatus(SLOTID_1, GetSerialId());
110     WaitFor(WAIT_TIME_SECOND);
111     EXPECT_EQ(SUCCESS, ret);
112     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_GET_SIM_STATUS));
113 }
114 
115 /**
116  * @tc.number   Telephony_DriverSystem_GetSimStatus_V1_0200
117  * @tc.name     Get sim status
118  * @tc.desc     Function test
119  */
120 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetSimStatus_V1_0200, Function | MediumTest | Level3)
121 {
122     if (g_rilInterface == nullptr) {
123         return;
124     }
125     int32_t ret = g_rilInterface->GetSimStatus(SLOTID_2, GetSerialId());
126     WaitFor(WAIT_TIME_SECOND);
127     EXPECT_EQ(SUCCESS, ret);
128     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_GET_SIM_STATUS));
129 }
130 
131 /**
132  * @tc.number   Telephony_DriverSystem_GetEmergencyCallList_V1_0100
133  * @tc.name     Get emergency call list
134  * @tc.desc     Function test
135  */
136 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetEmergencyCallList_V1_0100, Function | MediumTest | Level3)
137 {
138     if (!IsReady(SLOTID_1)) {
139         return;
140     }
141     int32_t ret = g_rilInterface->GetEmergencyCallList(SLOTID_1, GetSerialId());
142     WaitFor(WAIT_TIME_SECOND);
143     EXPECT_EQ(SUCCESS, ret);
144     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_EMERGENCY_LIST));
145 }
146 
147 /**
148  * @tc.number   Telephony_DriverSystem_GetEmergencyCallList_V1_0200
149  * @tc.name     Get emergency call list
150  * @tc.desc     Function test
151  */
152 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetEmergencyCallList_V1_0200, Function | MediumTest | Level3)
153 {
154     if (!IsReady(SLOTID_2)) {
155         return;
156     }
157     int32_t ret = g_rilInterface->GetEmergencyCallList(SLOTID_2, GetSerialId());
158     WaitFor(WAIT_TIME_SECOND);
159     EXPECT_EQ(SUCCESS, ret);
160     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_EMERGENCY_LIST));
161 }
162 
163 /**
164  * @tc.number   Telephony_DriverSystem_SetEmergencyCallList_V1_0100
165  * @tc.name     Set emergency call list
166  * @tc.desc     Function test
167  */
168 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetEmergencyCallList_V1_0100, Function | MediumTest | Level3)
169 {
170     if (!IsReady(SLOTID_1)) {
171         return;
172     }
173     EmergencyInfoList emergencyInfoList;
174     EmergencyCall emergencyInfo = {};
175     emergencyInfo.index = 1;
176     emergencyInfo.total = 1;
177     emergencyInfo.eccNum = "120";
178     emergencyInfo.eccType = EccType::TYPE_CATEGORY;
179     emergencyInfo.simpresent = SimpresentType::TYPE_HAS_CARD;
180     emergencyInfo.mcc = "460";
181     emergencyInfo.abnormalService = AbnormalServiceType::TYPE_ALL;
182     emergencyInfoList.calls.push_back(emergencyInfo);
183     int32_t ret = g_rilInterface->SetEmergencyCallList(SLOTID_1, GetSerialId(), emergencyInfoList);
184     WaitFor(WAIT_TIME_SECOND);
185     EXPECT_EQ(SUCCESS, ret);
186     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_EMERGENCY_LIST));
187 }
188 
189 /**
190  * @tc.number   Telephony_DriverSystem_SetEmergencyCallList_V2_0100
191  * @tc.name     Set emergency call list
192  * @tc.desc     Function test
193  */
194 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetEmergencyCallList_V2_0100, Function | MediumTest | Level3)
195 {
196     if (!IsReady(SLOTID_2)) {
197         return;
198     }
199     EmergencyInfoList emergencyInfoList;
200     EmergencyCall emergencyInfo = {};
201     emergencyInfo.index = 1;
202     emergencyInfo.total = 1;
203     emergencyInfo.eccNum = "120";
204     emergencyInfo.eccType = EccType::TYPE_CATEGORY;
205     emergencyInfo.simpresent = SimpresentType::TYPE_HAS_CARD;
206     emergencyInfo.mcc = "460";
207     emergencyInfo.abnormalService = AbnormalServiceType::TYPE_ALL;
208     emergencyInfoList.calls.push_back(emergencyInfo);
209     int32_t ret = g_rilInterface->SetEmergencyCallList(SLOTID_2, GetSerialId(), emergencyInfoList);
210     WaitFor(WAIT_TIME_SECOND);
211     EXPECT_EQ(SUCCESS, ret);
212     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_EMERGENCY_LIST));
213 }
214 
215 /**
216  * @tc.number   Telephony_DriverSystem_GetCallList_V1_0100
217  * @tc.name     Get call list
218  * @tc.desc     Function test
219  */
220 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCallList_V1_0100, Function | MediumTest | Level3)
221 {
222     if (!IsReady(SLOTID_1)) {
223         return;
224     }
225     int32_t ret = g_rilInterface->GetCallList(SLOTID_1, GetSerialId());
226     WaitFor(WAIT_TIME_SECOND);
227     EXPECT_EQ(SUCCESS, ret);
228     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CALL_LIST));
229 }
230 
231 /**
232  * @tc.number   Telephony_DriverSystem_GetCallList_V1_0200
233  * @tc.name     Get call list
234  * @tc.desc     Function test
235  */
236 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCallList_V1_0200, Function | MediumTest | Level3)
237 {
238     if (!IsReady(SLOTID_2)) {
239         return;
240     }
241     int32_t ret = g_rilInterface->GetCallList(SLOTID_2, GetSerialId());
242     WaitFor(WAIT_TIME_SECOND);
243     EXPECT_EQ(SUCCESS, ret);
244     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CALL_LIST));
245 }
246 
247 /**
248  * @tc.number   Telephony_DriverSystem_GetCallList_V1_0200
249  * @tc.name     Get call list
250  * @tc.desc     Function test
251  */
252 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_Dial_V1_0100, Function | MediumTest | Level3)
253 {
254     if (!IsReady(SLOTID_1)) {
255         return;
256     }
257     DialInfo dialInfo = {};
258     dialInfo.address = "10086";
259     dialInfo.clir = 0;
260     int32_t ret = g_rilInterface->Dial(SLOTID_1, GetSerialId(), dialInfo);
261     WaitFor(WAIT_TIME_SECOND);
262     EXPECT_EQ(SUCCESS, ret);
263     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_DIAL));
264 }
265 
266 /**
267  * @tc.number   Telephony_DriverSystem_Dial_V1_0200
268  * @tc.name     Dial
269  * @tc.desc     Function test
270  */
271 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_Dial_V1_0200, Function | MediumTest | Level3)
272 {
273     if (!IsReady(SLOTID_2)) {
274         return;
275     }
276     DialInfo dialInfo = {};
277     dialInfo.address = "10086";
278     dialInfo.clir = 0;
279     int32_t ret = g_rilInterface->Dial(SLOTID_2, GetSerialId(), dialInfo);
280     WaitFor(WAIT_TIME_SECOND);
281     EXPECT_EQ(SUCCESS, ret);
282     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_DIAL));
283 }
284 
285 /**
286  * @tc.number   Telephony_DriverSystem_Reject_V1_0100
287  * @tc.name     Reject
288  * @tc.desc     Function test
289  */
290 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_Reject_V1_0100, Function | MediumTest | Level3)
291 {
292     if (!IsReady(SLOTID_1)) {
293         return;
294     }
295     int32_t ret = g_rilInterface->Reject(SLOTID_1, GetSerialId());
296     WaitFor(WAIT_TIME_SECOND);
297     EXPECT_EQ(SUCCESS, ret);
298     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_REJECT));
299 }
300 
301 /**
302  * @tc.number   Telephony_DriverSystem_Reject_V1_0200
303  * @tc.name     Reject
304  * @tc.desc     Function test
305  */
306 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_Reject_V1_0200, Function | MediumTest | Level3)
307 {
308     if (!IsReady(SLOTID_2)) {
309         return;
310     }
311     int32_t ret = g_rilInterface->Reject(SLOTID_2, GetSerialId());
312     WaitFor(WAIT_TIME_SECOND);
313     EXPECT_EQ(SUCCESS, ret);
314     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_REJECT));
315 }
316 
317 /**
318  * @tc.number   Telephony_DriverSystem_Hangup_V1_0100
319  * @tc.name     Hangup
320  * @tc.desc     Function test
321  */
322 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_Hangup_V1_0100, Function | MediumTest | Level3)
323 {
324     if (!IsReady(SLOTID_1)) {
325         return;
326     }
327     int32_t ret = g_rilInterface->Hangup(SLOTID_1, GetSerialId(), 0);
328     WaitFor(WAIT_TIME_SECOND);
329     EXPECT_EQ(SUCCESS, ret);
330     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_HANGUP));
331 }
332 
333 /**
334  * @tc.number   Telephony_DriverSystem_Hangup_V1_0200
335  * @tc.name     Hangup
336  * @tc.desc     Function test
337  */
338 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_Hangup_V1_0200, Function | MediumTest | Level3)
339 {
340     if (!IsReady(SLOTID_2)) {
341         return;
342     }
343     int32_t ret = g_rilInterface->Hangup(SLOTID_2, GetSerialId(), 0);
344     WaitFor(WAIT_TIME_SECOND);
345     EXPECT_EQ(SUCCESS, ret);
346     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_HANGUP));
347 }
348 
349 /**
350  * @tc.number   Telephony_DriverSystem_Answer_V1_0100
351  * @tc.name     Answer
352  * @tc.desc     Function test
353  */
354 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_Answer_V1_0100, Function | MediumTest | Level3)
355 {
356     if (!IsReady(SLOTID_1)) {
357         return;
358     }
359     int32_t ret = g_rilInterface->Answer(SLOTID_1, GetSerialId());
360     WaitFor(WAIT_TIME_SECOND);
361     EXPECT_EQ(SUCCESS, ret);
362     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_ANSWER));
363 }
364 
365 /**
366  * @tc.number   Telephony_DriverSystem_Answer_V1_0200
367  * @tc.name     Answer
368  * @tc.desc     Function test
369  */
370 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_Answer_V1_0200, Function | MediumTest | Level3)
371 {
372     if (!IsReady(SLOTID_2)) {
373         return;
374     }
375     int32_t ret = g_rilInterface->Answer(SLOTID_2, GetSerialId());
376     WaitFor(WAIT_TIME_SECOND);
377     EXPECT_EQ(SUCCESS, ret);
378     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_ANSWER));
379 }
380 
381 /**
382  * @tc.number   Telephony_DriverSystem_HoldCall_V1_0100
383  * @tc.name     HoldCall
384  * @tc.desc     Function test
385  */
386 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_HoldCall_V1_0100, Function | MediumTest | Level3)
387 {
388     if (!IsReady(SLOTID_1)) {
389         return;
390     }
391     int32_t ret = g_rilInterface->HoldCall(SLOTID_1, GetSerialId());
392     WaitFor(WAIT_TIME_SECOND);
393     EXPECT_EQ(SUCCESS, ret);
394     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_HOLD_CALL));
395 }
396 
397 /**
398  * @tc.number   Telephony_DriverSystem_HoldCall_V1_0200
399  * @tc.name     HoldCall
400  * @tc.desc     Function test
401  */
402 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_HoldCall_V1_0200, Function | MediumTest | Level3)
403 {
404     if (!IsReady(SLOTID_2)) {
405         return;
406     }
407     int32_t ret = g_rilInterface->HoldCall(SLOTID_2, GetSerialId());
408     WaitFor(WAIT_TIME_SECOND);
409     EXPECT_EQ(SUCCESS, ret);
410     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_HOLD_CALL));
411 }
412 
413 /**
414  * @tc.number   Telephony_DriverSystem_UnHoldCall_V1_0100
415  * @tc.name     UnHoldCall
416  * @tc.desc     Function test
417  */
418 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UnHoldCall_V1_0100, Function | MediumTest | Level3)
419 {
420     if (!IsReady(SLOTID_1)) {
421         return;
422     }
423     int32_t ret = g_rilInterface->UnHoldCall(SLOTID_1, GetSerialId());
424     WaitFor(WAIT_TIME_SECOND);
425     EXPECT_EQ(SUCCESS, ret);
426     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_UNHOLD_CALL));
427 }
428 
429 /**
430  * @tc.number   Telephony_DriverSystem_UnHoldCall_V1_0200
431  * @tc.name     UnHoldCall
432  * @tc.desc     Function test
433  */
434 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UnHoldCall_V1_0200, Function | MediumTest | Level3)
435 {
436     if (!IsReady(SLOTID_2)) {
437         return;
438     }
439     int32_t ret = g_rilInterface->UnHoldCall(SLOTID_2, GetSerialId());
440     WaitFor(WAIT_TIME_SECOND);
441     EXPECT_EQ(SUCCESS, ret);
442     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_UNHOLD_CALL));
443 }
444 
445 /**
446  * @tc.number   Telephony_DriverSystem_SwitchCall_V1_0100
447  * @tc.name     Switch call
448  * @tc.desc     Function test
449  */
450 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SwitchCall_V1_0100, Function | MediumTest | Level3)
451 {
452     if (!IsReady(SLOTID_1)) {
453         return;
454     }
455     int32_t ret = g_rilInterface->SwitchCall(SLOTID_1, GetSerialId());
456     WaitFor(WAIT_TIME_SECOND);
457     EXPECT_EQ(SUCCESS, ret);
458     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SWITCH_CALL));
459 }
460 
461 /**
462  * @tc.number   Telephony_DriverSystem_SwitchCall_V1_0200
463  * @tc.name     Switch call
464  * @tc.desc     Function test
465  */
466 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SwitchCall_V1_0200, Function | MediumTest | Level3)
467 {
468     if (!IsReady(SLOTID_2)) {
469         return;
470     }
471     int32_t ret = g_rilInterface->SwitchCall(SLOTID_2, GetSerialId());
472     WaitFor(WAIT_TIME_SECOND);
473     EXPECT_EQ(SUCCESS, ret);
474     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SWITCH_CALL));
475 }
476 
477 /**
478  * @tc.number   Telephony_DriverSystem_CombineConference_V1_0100
479  * @tc.name     Combine conference
480  * @tc.desc     Function test
481  */
482 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_CombineConference_V1_0100, Function | MediumTest | Level3)
483 {
484     if (!IsReady(SLOTID_1)) {
485         return;
486     }
487     int32_t ret = g_rilInterface->CombineConference(SLOTID_1, GetSerialId(), 0);
488     WaitFor(WAIT_TIME_SECOND);
489     EXPECT_EQ(SUCCESS, ret);
490     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_COMBINE_CONFERENCE));
491 }
492 
493 /**
494  * @tc.number   Telephony_DriverSystem_CombineConference_V1_0200
495  * @tc.name     Combine conference
496  * @tc.desc     Function test
497  */
498 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_CombineConference_V1_0200, Function | MediumTest | Level3)
499 {
500     if (!IsReady(SLOTID_2)) {
501         return;
502     }
503     int32_t ret = g_rilInterface->CombineConference(SLOTID_2, GetSerialId(), 0);
504     WaitFor(WAIT_TIME_SECOND);
505     EXPECT_EQ(SUCCESS, ret);
506     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_COMBINE_CONFERENCE));
507 }
508 
509 /**
510  * @tc.number   Telephony_DriverSystem_SeparateConference_V1_0100
511  * @tc.name     Separate conference
512  * @tc.desc     Function test
513  */
514 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SeparateConference_V1_0100, Function | MediumTest | Level3)
515 {
516     if (!IsReady(SLOTID_1)) {
517         return;
518     }
519     int32_t ret = g_rilInterface->SeparateConference(SLOTID_1, GetSerialId(), 1, 0);
520     WaitFor(WAIT_TIME_SECOND);
521     EXPECT_EQ(SUCCESS, ret);
522     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SEPARATE_CONFERENCE));
523 }
524 
525 /**
526  * @tc.number   Telephony_DriverSystem_SeparateConference_V1_0200
527  * @tc.name     Separate conference
528  * @tc.desc     Function test
529  */
530 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SeparateConference_V1_0200, Function | MediumTest | Level3)
531 {
532     if (!IsReady(SLOTID_2)) {
533         return;
534     }
535     int32_t ret = g_rilInterface->SeparateConference(SLOTID_2, GetSerialId(), 1, 0);
536     WaitFor(WAIT_TIME_SECOND);
537     EXPECT_EQ(SUCCESS, ret);
538     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SEPARATE_CONFERENCE));
539 }
540 
541 /**
542  * @tc.number   Telephony_DriverSystem_GetCallWaiting_V1_0100
543  * @tc.name     Get call waiting
544  * @tc.desc     Function test
545  */
546 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCallWaiting_V1_0100, Function | MediumTest | Level3)
547 {
548     if (!IsReady(SLOTID_1)) {
549         return;
550     }
551     int32_t ret = g_rilInterface->GetCallWaiting(SLOTID_1, GetSerialId());
552     WaitFor(WAIT_TIME_SECOND);
553     EXPECT_EQ(SUCCESS, ret);
554     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CALL_WAITING));
555 }
556 
557 /**
558  * @tc.number   Telephony_DriverSystem_GetCallWaiting_V1_0200
559  * @tc.name     Get call waiting
560  * @tc.desc     Function test
561  */
562 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCallWaiting_V1_0200, Function | MediumTest | Level3)
563 {
564     if (!IsReady(SLOTID_2)) {
565         return;
566     }
567     int32_t ret = g_rilInterface->GetCallWaiting(SLOTID_2, GetSerialId());
568     WaitFor(WAIT_TIME_SECOND);
569     EXPECT_EQ(SUCCESS, ret);
570     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CALL_WAITING));
571 }
572 
573 /**
574  * @tc.number   Telephony_DriverSystem_SetCallWaiting_V1_0100
575  * @tc.name     Set call waiting
576  * @tc.desc     Function test
577  */
578 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetCallWaiting_V1_0100, Function | MediumTest | Level3)
579 {
580     if (!IsReady(SLOTID_1)) {
581         return;
582     }
583     int32_t ret = g_rilInterface->SetCallWaiting(SLOTID_1, GetSerialId(), 0);
584     WaitFor(WAIT_TIME_SECOND);
585     EXPECT_EQ(SUCCESS, ret);
586     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_CALL_WAITING));
587 }
588 
589 /**
590  * @tc.number   Telephony_DriverSystem_SetCallWaiting_V1_0200
591  * @tc.name     Set call waiting
592  * @tc.desc     Function test
593  */
594 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetCallWaiting_V1_0200, Function | MediumTest | Level3)
595 {
596     if (!IsReady(SLOTID_2)) {
597         return;
598     }
599     int32_t ret = g_rilInterface->SetCallWaiting(SLOTID_2, GetSerialId(), 0);
600     WaitFor(WAIT_TIME_SECOND);
601     EXPECT_EQ(SUCCESS, ret);
602     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_CALL_WAITING));
603 }
604 
605 /**
606  * @tc.number   Telephony_DriverSystem_GetCallTransferInfo_V1_0100
607  * @tc.name     Get call transfer info
608  * @tc.desc     Function test
609  */
610 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCallTransferInfo_V1_0100, Function | MediumTest | Level3)
611 {
612     if (!IsReady(SLOTID_1)) {
613         return;
614     }
615     int32_t ret = g_rilInterface->GetCallTransferInfo(SLOTID_1, GetSerialId(), 1);
616     WaitFor(WAIT_TIME_SECOND);
617     EXPECT_EQ(SUCCESS, ret);
618     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CALL_TRANSFER_INFO));
619 }
620 
621 /**
622  * @tc.number   Telephony_DriverSystem_GetCallTransferInfo_V1_0200
623  * @tc.name     Get call transfer info
624  * @tc.desc     Function test
625  */
626 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCallTransferInfo_V1_0200, Function | MediumTest | Level3)
627 {
628     if (!IsReady(SLOTID_2)) {
629         return;
630     }
631     int32_t ret = g_rilInterface->GetCallTransferInfo(SLOTID_2, GetSerialId(), 1);
632     WaitFor(WAIT_TIME_SECOND);
633     EXPECT_EQ(SUCCESS, ret);
634     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CALL_TRANSFER_INFO));
635 }
636 
637 /**
638  * @tc.number   Telephony_DriverSystem_SetCallTransferInfo_V1_0100
639  * @tc.name     Set call transfer info
640  * @tc.desc     Function test
641  */
642 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetCallTransferInfo_V1_0100, Function | MediumTest | Level3)
643 {
644     if (!IsReady(SLOTID_1)) {
645         return;
646     }
647     CallForwardSetInfo callForwardSetInfo = {};
648     callForwardSetInfo.reason = 1;
649     callForwardSetInfo.mode = 1;
650     callForwardSetInfo.classx = 1;
651     callForwardSetInfo.number = "10086";
652     int32_t ret = g_rilInterface->SetCallTransferInfo(SLOTID_1, GetSerialId(), callForwardSetInfo);
653     WaitFor(WAIT_TIME_SECOND);
654     EXPECT_EQ(SUCCESS, ret);
655     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_CALL_TRANSFER_INFO));
656 }
657 
658 /**
659  * @tc.number   Telephony_DriverSystem_SetCallTransferInfo_V1_0200
660  * @tc.name     Set call transfer info
661  * @tc.desc     Function test
662  */
663 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetCallTransferInfo_V1_0200, Function | MediumTest | Level3)
664 {
665     if (!IsReady(SLOTID_2)) {
666         return;
667     }
668     CallForwardSetInfo callForwardSetInfo = {};
669     callForwardSetInfo.reason = 1;
670     callForwardSetInfo.mode = 1;
671     callForwardSetInfo.classx = 1;
672     callForwardSetInfo.number = "10086";
673     int32_t ret = g_rilInterface->SetCallTransferInfo(SLOTID_2, GetSerialId(), callForwardSetInfo);
674     WaitFor(WAIT_TIME_SECOND);
675     EXPECT_EQ(SUCCESS, ret);
676     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_CALL_TRANSFER_INFO));
677 }
678 
679 /**
680  * @tc.number   Telephony_DriverSystem_GetCallRestriction_V1_0100
681  * @tc.name     Get call restriction
682  * @tc.desc     Function test
683  */
684 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCallRestriction_V1_0100, Function | MediumTest | Level3)
685 {
686     if (!IsReady(SLOTID_1)) {
687         return;
688     }
689     std::string fac = "AO";
690     int32_t ret = g_rilInterface->GetCallRestriction(SLOTID_1, GetSerialId(), fac);
691     WaitFor(WAIT_TIME_SECOND);
692     EXPECT_EQ(SUCCESS, ret);
693     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CALL_RESTRICTION));
694 }
695 
696 /**
697  * @tc.number   Telephony_DriverSystem_GetCallRestriction_V1_0200
698  * @tc.name     Get call restriction
699  * @tc.desc     Function test
700  */
701 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCallRestriction_V1_0200, Function | MediumTest | Level3)
702 {
703     if (!IsReady(SLOTID_2)) {
704         return;
705     }
706     std::string fac = "AO";
707     int32_t ret = g_rilInterface->GetCallRestriction(SLOTID_2, GetSerialId(), fac);
708     WaitFor(WAIT_TIME_SECOND);
709     EXPECT_EQ(SUCCESS, ret);
710     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CALL_RESTRICTION));
711 }
712 
713 /**
714  * @tc.number   Telephony_DriverSystem_SetCallRestriction_V1_0100
715  * @tc.name     Set call restriction
716  * @tc.desc     Function test
717  */
718 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetCallRestriction_V1_0100, Function | MediumTest | Level3)
719 {
720     if (!IsReady(SLOTID_1)) {
721         return;
722     }
723     CallRestrictionInfo callRestrictionInfo = {};
724     callRestrictionInfo.fac = "AO";
725     callRestrictionInfo.mode = 1;
726     callRestrictionInfo.password = "123456";
727     int32_t ret = g_rilInterface->SetCallRestriction(SLOTID_1, GetSerialId(), callRestrictionInfo);
728     WaitFor(WAIT_TIME_SECOND);
729     EXPECT_EQ(SUCCESS, ret);
730     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_CALL_RESTRICTION));
731 }
732 
733 /**
734  * @tc.number   Telephony_DriverSystem_GetCallRestriction_V1_0200
735  * @tc.name     Set call restriction
736  * @tc.desc     Function test
737  */
738 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetCallRestriction_V1_0200, Function | MediumTest | Level3)
739 {
740     if (!IsReady(SLOTID_2)) {
741         return;
742     }
743     CallRestrictionInfo callRestrictionInfo = {};
744     callRestrictionInfo.fac = "AO";
745     callRestrictionInfo.mode = 1;
746     callRestrictionInfo.password = "123456";
747     int32_t ret = g_rilInterface->SetCallRestriction(SLOTID_2, GetSerialId(), callRestrictionInfo);
748     WaitFor(WAIT_TIME_SECOND);
749     EXPECT_EQ(SUCCESS, ret);
750     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_CALL_RESTRICTION));
751 }
752 
753 /**
754  * @tc.number   Telephony_DriverSystem_GetClip_V1_0100
755  * @tc.name     Get clip
756  * @tc.desc     Function test
757  */
758 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetClip_V1_0100, Function | MediumTest | Level3)
759 {
760     if (!IsReady(SLOTID_1)) {
761         return;
762     }
763     int32_t ret = g_rilInterface->GetClip(SLOTID_1, GetSerialId());
764     WaitFor(WAIT_TIME_SECOND);
765     EXPECT_EQ(SUCCESS, ret);
766     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CLIP));
767 }
768 
769 /**
770  * @tc.number   Telephony_DriverSystem_GetClip_V1_0200
771  * @tc.name     Get clip
772  * @tc.desc     Function test
773  */
774 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetClip_V1_0200, Function | MediumTest | Level3)
775 {
776     if (!IsReady(SLOTID_2)) {
777         return;
778     }
779     int32_t ret = g_rilInterface->GetClip(SLOTID_2, GetSerialId());
780     WaitFor(WAIT_TIME_SECOND);
781     EXPECT_EQ(SUCCESS, ret);
782     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CLIP));
783 }
784 
785 /**
786  * @tc.number   Telephony_DriverSystem_SetClip_V1_0100
787  * @tc.name     Set clip
788  * @tc.desc     Function test
789  */
790 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetClip_V1_0100, Function | MediumTest | Level3)
791 {
792     if (!IsReady(SLOTID_1)) {
793         return;
794     }
795     int32_t ret = g_rilInterface->SetClip(SLOTID_1, GetSerialId(), 1);
796     WaitFor(WAIT_TIME_SECOND);
797     EXPECT_EQ(SUCCESS, ret);
798     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_CLIP));
799 }
800 
801 /**
802  * @tc.number   Telephony_DriverSystem_SetClip_V1_0200
803  * @tc.name     Set clip
804  * @tc.desc     Function test
805  */
806 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetClip_V1_0200, Function | MediumTest | Level3)
807 {
808     if (!IsReady(SLOTID_2)) {
809         return;
810     }
811     int32_t ret = g_rilInterface->SetClip(SLOTID_2, GetSerialId(), 1);
812     WaitFor(WAIT_TIME_SECOND);
813     EXPECT_EQ(SUCCESS, ret);
814     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_CLIP));
815 }
816 
817 /**
818  * @tc.number   Telephony_DriverSystem_GetClir_V1_0100
819  * @tc.name     Get clip
820  * @tc.desc     Function test
821  */
822 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetClir_V1_0100, Function | MediumTest | Level3)
823 {
824     if (!IsReady(SLOTID_1)) {
825         return;
826     }
827     int32_t ret = g_rilInterface->GetClir(SLOTID_1, GetSerialId());
828     WaitFor(WAIT_TIME_SECOND);
829     EXPECT_EQ(SUCCESS, ret);
830     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CLIR));
831 }
832 
833 /**
834  * @tc.number   Telephony_DriverSystem_GetClir_V1_0200
835  * @tc.name     Get clip
836  * @tc.desc     Function test
837  */
838 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetClir_V1_0200, Function | MediumTest | Level3)
839 {
840     if (!IsReady(SLOTID_2)) {
841         return;
842     }
843     int32_t ret = g_rilInterface->GetClir(SLOTID_2, GetSerialId());
844     WaitFor(WAIT_TIME_SECOND);
845     EXPECT_EQ(SUCCESS, ret);
846     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CLIR));
847 }
848 
849 /**
850  * @tc.number   Telephony_DriverSystem_SetClir_V1_0100
851  * @tc.name     Set clir
852  * @tc.desc     Function test
853  */
854 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetClir_V1_0100, Function | MediumTest | Level3)
855 {
856     if (!IsReady(SLOTID_1)) {
857         return;
858     }
859     int32_t ret = g_rilInterface->SetClir(SLOTID_1, GetSerialId(), 1);
860     WaitFor(WAIT_TIME_SECOND);
861     EXPECT_EQ(SUCCESS, ret);
862     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_CLIR));
863 }
864 
865 /**
866  * @tc.number   Telephony_DriverSystem_SetClir_V1_0200
867  * @tc.name     Set clir
868  * @tc.desc     Function test
869  */
870 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetClir_V1_0200, Function | MediumTest | Level3)
871 {
872     if (!IsReady(SLOTID_2)) {
873         return;
874     }
875     int32_t ret = g_rilInterface->SetClir(SLOTID_2, GetSerialId(), 1);
876     WaitFor(WAIT_TIME_SECOND);
877     EXPECT_EQ(SUCCESS, ret);
878     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_CLIR));
879 }
880 
881 /**
882  * @tc.number   Telephony_DriverSystem_SetCallPreferenceMode_V1_0100
883  * @tc.name     Set call preference mode
884  * @tc.desc     Function test
885  */
886 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetCallPreferenceMode_V1_0100, Function | MediumTest | Level3)
887 {
888     if (!IsReady(SLOTID_1)) {
889         return;
890     }
891     int32_t ret = g_rilInterface->SetCallPreferenceMode(SLOTID_1, GetSerialId(), 1);
892     WaitFor(WAIT_TIME_SECOND);
893     EXPECT_EQ(SUCCESS, ret);
894     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_CALL_PREFERENCE));
895 }
896 
897 /**
898  * @tc.number   Telephony_DriverSystem_SetCallPreferenceMode_V1_0200
899  * @tc.name     Set call preference mode
900  * @tc.desc     Function test
901  */
902 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetCallPreferenceMode_V1_0200, Function | MediumTest | Level3)
903 {
904     if (!IsReady(SLOTID_2)) {
905         return;
906     }
907     int32_t ret = g_rilInterface->SetCallPreferenceMode(SLOTID_2, GetSerialId(), 1);
908     WaitFor(WAIT_TIME_SECOND);
909     EXPECT_EQ(SUCCESS, ret);
910     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_CALL_PREFERENCE));
911 }
912 
913 /**
914  * @tc.number   Telephony_DriverSystem_GetCallPreferenceMode_V1_0100
915  * @tc.name     Get call preference mode
916  * @tc.desc     Function test
917  */
918 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCallPreferenceMode_V1_0100, Function | MediumTest | Level3)
919 {
920     if (!IsReady(SLOTID_1)) {
921         return;
922     }
923     int32_t ret = g_rilInterface->GetCallPreferenceMode(SLOTID_1, GetSerialId());
924     WaitFor(WAIT_TIME_SECOND);
925     EXPECT_EQ(SUCCESS, ret);
926     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CALL_PREFERENCE));
927 }
928 
929 /**
930  * @tc.number   Telephony_DriverSystem_SetCallPreferenceMode_V1_0200
931  * @tc.name     Get call preference mode
932  * @tc.desc     Function test
933  */
934 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCallPreferenceMode_V1_0200, Function | MediumTest | Level3)
935 {
936     if (!IsReady(SLOTID_2)) {
937         return;
938     }
939     int32_t ret = g_rilInterface->GetCallPreferenceMode(SLOTID_2, GetSerialId());
940     WaitFor(WAIT_TIME_SECOND);
941     EXPECT_EQ(SUCCESS, ret);
942     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_CALL_PREFERENCE));
943 }
944 
945 /**
946  * @tc.number   Telephony_DriverSystem_SetUssd_V1_0100
947  * @tc.name     Set ussd
948  * @tc.desc     Function test
949  */
950 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetUssd_V1_0100, Function | MediumTest | Level3)
951 {
952     if (!IsReady(SLOTID_1)) {
953         return;
954     }
955     int32_t ret = g_rilInterface->SetUssd(SLOTID_1, GetSerialId(), "12345678");
956     WaitFor(WAIT_TIME_SECOND);
957     EXPECT_EQ(SUCCESS, ret);
958     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_USSD));
959 }
960 
961 /**
962  * @tc.number   Telephony_DriverSystem_SetUssd_V1_0200
963  * @tc.name     Set ussd
964  * @tc.desc     Function test
965  */
966 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetUssd_V1_0200, Function | MediumTest | Level3)
967 {
968     if (!IsReady(SLOTID_2)) {
969         return;
970     }
971     int32_t ret = g_rilInterface->SetUssd(SLOTID_2, GetSerialId(), "12345678");
972     WaitFor(WAIT_TIME_SECOND);
973     EXPECT_EQ(SUCCESS, ret);
974     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_USSD));
975 }
976 
977 /**
978  * @tc.number   Telephony_DriverSystem_GetUssd_V1_0100
979  * @tc.name     Get ussd
980  * @tc.desc     Function test
981  */
982 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetUssd_V1_0100, Function | MediumTest | Level3)
983 {
984     if (!IsReady(SLOTID_1)) {
985         return;
986     }
987     int32_t ret = g_rilInterface->GetUssd(SLOTID_1, GetSerialId());
988     WaitFor(WAIT_TIME_SECOND);
989     EXPECT_EQ(SUCCESS, ret);
990     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_USSD));
991 }
992 
993 /**
994  * @tc.number   Telephony_DriverSystem_GetUssd_V1_0200
995  * @tc.name     Get ussd
996  * @tc.desc     Function test
997  */
998 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetUssd_V1_0200, Function | MediumTest | Level3)
999 {
1000     if (!IsReady(SLOTID_2)) {
1001         return;
1002     }
1003     int32_t ret = g_rilInterface->GetUssd(SLOTID_2, GetSerialId());
1004     WaitFor(WAIT_TIME_SECOND);
1005     EXPECT_EQ(SUCCESS, ret);
1006     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_USSD));
1007 }
1008 
1009 /**
1010  * @tc.number   Telephony_DriverSystem_SetMute_V1_0100
1011  * @tc.name     Set mute
1012  * @tc.desc     Function test
1013  */
1014 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetMute_V1_0100, Function | MediumTest | Level3)
1015 {
1016     if (!IsReady(SLOTID_1)) {
1017         return;
1018     }
1019     int32_t ret = g_rilInterface->SetMute(SLOTID_1, GetSerialId(), 1);
1020     WaitFor(WAIT_TIME_SECOND);
1021     EXPECT_EQ(SUCCESS, ret);
1022     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_MUTE));
1023 }
1024 
1025 /**
1026  * @tc.number   Telephony_DriverSystem_SetMute_V1_0200
1027  * @tc.name     Set mute
1028  * @tc.desc     Function test
1029  */
1030 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetMute_V1_0200, Function | MediumTest | Level3)
1031 {
1032     if (!IsReady(SLOTID_2)) {
1033         return;
1034     }
1035     int32_t ret = g_rilInterface->SetMute(SLOTID_2, GetSerialId(), 1);
1036     WaitFor(WAIT_TIME_SECOND);
1037     EXPECT_EQ(SUCCESS, ret);
1038     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_MUTE));
1039 }
1040 
1041 /**
1042  * @tc.number   Telephony_DriverSystem_GetMute_V1_0100
1043  * @tc.name     Get mute
1044  * @tc.desc     Function test
1045  */
1046 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetMute_V1_0100, Function | MediumTest | Level3)
1047 {
1048     if (!IsReady(SLOTID_1)) {
1049         return;
1050     }
1051     int32_t ret = g_rilInterface->GetMute(SLOTID_1, GetSerialId());
1052     WaitFor(WAIT_TIME_SECOND);
1053     EXPECT_EQ(SUCCESS, ret);
1054     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_MUTE));
1055 }
1056 
1057 /**
1058  * @tc.number   Telephony_DriverSystem_GetMute_V1_0200
1059  * @tc.name     Get mute
1060  * @tc.desc     Function test
1061  */
1062 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetMute_V1_0200, Function | MediumTest | Level3)
1063 {
1064     if (!IsReady(SLOTID_2)) {
1065         return;
1066     }
1067     int32_t ret = g_rilInterface->GetMute(SLOTID_2, GetSerialId());
1068     WaitFor(WAIT_TIME_SECOND);
1069     EXPECT_EQ(SUCCESS, ret);
1070     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_MUTE));
1071 }
1072 
1073 /**
1074  * @tc.number   Telephony_DriverSystem_GetCallFailReason_V1_0100
1075  * @tc.name     Get call fail reason
1076  * @tc.desc     Function test
1077  */
1078 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCallFailReason_V1_0100, Function | MediumTest | Level3)
1079 {
1080     if (!IsReady(SLOTID_1)) {
1081         return;
1082     }
1083     int32_t ret = g_rilInterface->GetCallFailReason(SLOTID_1, GetSerialId());
1084     WaitFor(WAIT_TIME_SECOND);
1085     EXPECT_EQ(SUCCESS, ret);
1086     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_FAIL_REASON));
1087 }
1088 
1089 /**
1090  * @tc.number   Telephony_DriverSystem_GetCallFailReason_V1_0200
1091  * @tc.name     Get call fail reason
1092  * @tc.desc     Function test
1093  */
1094 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCallFailReason_V1_0200, Function | MediumTest | Level3)
1095 {
1096     if (!IsReady(SLOTID_2)) {
1097         return;
1098     }
1099     int32_t ret = g_rilInterface->GetCallFailReason(SLOTID_2, GetSerialId());
1100     WaitFor(WAIT_TIME_SECOND);
1101     EXPECT_EQ(SUCCESS, ret);
1102     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_GET_FAIL_REASON));
1103 }
1104 
1105 /**
1106  * @tc.number   Telephony_DriverSystem_CallSupplement_V1_0100
1107  * @tc.name     Call supplement
1108  * @tc.desc     Function test
1109  */
1110 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_CallSupplement_V1_0100, Function | MediumTest | Level3)
1111 {
1112     if (!IsReady(SLOTID_1)) {
1113         return;
1114     }
1115     int32_t ret = g_rilInterface->CallSupplement(SLOTID_1, GetSerialId(), 1);
1116     WaitFor(WAIT_TIME_SECOND);
1117     EXPECT_EQ(SUCCESS, ret);
1118     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_CALL_SUPPLEMENT));
1119 }
1120 
1121 /**
1122  * @tc.number   Telephony_DriverSystem_CallSupplement_V1_0200
1123  * @tc.name     Call supplement
1124  * @tc.desc     Function test
1125  */
1126 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_CallSupplement_V1_0200, Function | MediumTest | Level3)
1127 {
1128     if (!IsReady(SLOTID_2)) {
1129         return;
1130     }
1131     int32_t ret = g_rilInterface->CallSupplement(SLOTID_2, GetSerialId(), 1);
1132     WaitFor(WAIT_TIME_SECOND);
1133     EXPECT_EQ(SUCCESS, ret);
1134     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_CALL_SUPPLEMENT));
1135 }
1136 
1137 /**
1138  * @tc.number   Telephony_DriverSystem_SendDtmf_V1_0100
1139  * @tc.name     Send dtmf
1140  * @tc.desc     Function test
1141  */
1142 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SendDtmf_V1_0100, Function | MediumTest | Level3)
1143 {
1144     if (!IsReady(SLOTID_1)) {
1145         return;
1146     }
1147     DtmfInfo dtmfInfo = {};
1148     dtmfInfo.callId = 0;
1149     dtmfInfo.dtmfKey = "#";
1150     dtmfInfo.onLength = 300;
1151     dtmfInfo.offLength = 0;
1152     dtmfInfo.stringLength = 1;
1153     int32_t ret = g_rilInterface->SendDtmf(SLOTID_1, GetSerialId(), dtmfInfo);
1154     WaitFor(WAIT_TIME_SECOND);
1155     EXPECT_EQ(SUCCESS, ret);
1156     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SEND_DTMF));
1157 }
1158 
1159 /**
1160  * @tc.number   Telephony_DriverSystem_SendDtmf_V1_0200
1161  * @tc.name     Send dtmf
1162  * @tc.desc     Function test
1163  */
1164 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SendDtmf_V1_0200, Function | MediumTest | Level3)
1165 {
1166     if (!IsReady(SLOTID_2)) {
1167         return;
1168     }
1169     DtmfInfo dtmfInfo = {};
1170     dtmfInfo.callId = 0;
1171     dtmfInfo.dtmfKey = "#";
1172     dtmfInfo.onLength = 1;
1173     dtmfInfo.offLength = 0;
1174     dtmfInfo.stringLength = 1;
1175     int32_t ret = g_rilInterface->SendDtmf(SLOTID_2, GetSerialId(), dtmfInfo);
1176     WaitFor(WAIT_TIME_SECOND);
1177     EXPECT_EQ(SUCCESS, ret);
1178     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SEND_DTMF));
1179 }
1180 
1181 /**
1182  * @tc.number   Telephony_DriverSystem_StartDtmf_V1_0100
1183  * @tc.name     Start dtmf
1184  * @tc.desc     Function test
1185  */
1186 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_StartDtmf_V1_0100, Function | MediumTest | Level3)
1187 {
1188     if (!IsReady(SLOTID_1)) {
1189         return;
1190     }
1191     DtmfInfo dtmfInfo = {};
1192     dtmfInfo.callId = 0;
1193     dtmfInfo.dtmfKey = "#";
1194     int32_t ret = g_rilInterface->StartDtmf(SLOTID_1, GetSerialId(), dtmfInfo);
1195     WaitFor(WAIT_TIME_SECOND);
1196     EXPECT_EQ(SUCCESS, ret);
1197     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_START_DTMF));
1198 }
1199 
1200 /**
1201  * @tc.number   Telephony_DriverSystem_StartDtmf_V1_0200
1202  * @tc.name     Start dtmf
1203  * @tc.desc     Function test
1204  */
1205 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_StartDtmf_V1_0200, Function | MediumTest | Level3)
1206 {
1207     if (!IsReady(SLOTID_2)) {
1208         return;
1209     }
1210     DtmfInfo dtmfInfo = {};
1211     dtmfInfo.callId = 0;
1212     dtmfInfo.dtmfKey = "#";
1213     int32_t ret = g_rilInterface->StartDtmf(SLOTID_2, GetSerialId(), dtmfInfo);
1214     WaitFor(WAIT_TIME_SECOND);
1215     EXPECT_EQ(SUCCESS, ret);
1216     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_START_DTMF));
1217 }
1218 
1219 /**
1220  * @tc.number   Telephony_DriverSystem_StopDtmf_V1_0100
1221  * @tc.name     Stop dtmf
1222  * @tc.desc     Function test
1223  */
1224 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_StopDtmf_V1_0100, Function | MediumTest | Level3)
1225 {
1226     if (!IsReady(SLOTID_1)) {
1227         return;
1228     }
1229     DtmfInfo dtmfInfo = {};
1230     dtmfInfo.callId = 0;
1231     dtmfInfo.dtmfKey = "#";
1232     int32_t ret = g_rilInterface->StopDtmf(SLOTID_1, GetSerialId(), dtmfInfo);
1233     WaitFor(WAIT_TIME_SECOND);
1234     EXPECT_EQ(SUCCESS, ret);
1235     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_STOP_DTMF));
1236 }
1237 
1238 /**
1239  * @tc.number   Telephony_DriverSystem_StopDtmf_V1_0200
1240  * @tc.name     Stop dtmf
1241  * @tc.desc     Function test
1242  */
1243 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_StopDtmf_V1_0200, Function | MediumTest | Level3)
1244 {
1245     if (!IsReady(SLOTID_2)) {
1246         return;
1247     }
1248     DtmfInfo dtmfInfo = {};
1249     dtmfInfo.callId = 0;
1250     dtmfInfo.dtmfKey = "#";
1251     int32_t ret = g_rilInterface->StopDtmf(SLOTID_2, GetSerialId(), dtmfInfo);
1252     WaitFor(WAIT_TIME_SECOND);
1253     EXPECT_EQ(SUCCESS, ret);
1254     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_STOP_DTMF));
1255 }
1256 
1257 /**
1258  * @tc.number   Telephony_DriverSystem_SetBarringPassword_V1_0100
1259  * @tc.name     Set barring password
1260  * @tc.desc     Function test
1261  */
1262 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetBarringPassword_V1_0100, Function | MediumTest | Level3)
1263 {
1264     if (!IsReady(SLOTID_1)) {
1265         return;
1266     }
1267     SetBarringInfo setBarringInfo = {};
1268     setBarringInfo.fac = "AB";
1269     setBarringInfo.oldPassword = "1234";
1270     setBarringInfo.newPassword = "2345";
1271     int32_t ret = g_rilInterface->SetBarringPassword(SLOTID_1, GetSerialId(), setBarringInfo);
1272     WaitFor(WAIT_TIME_SECOND);
1273     EXPECT_EQ(SUCCESS, ret);
1274     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_BARRING_PASSWORD));
1275 }
1276 
1277 /**
1278  * @tc.number   Telephony_DriverSystem_SetBarringPassword_V1_0200
1279  * @tc.name     Set barring password
1280  * @tc.desc     Function test
1281  */
1282 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetBarringPassword_V1_0200, Function | MediumTest | Level3)
1283 {
1284     if (!IsReady(SLOTID_2)) {
1285         return;
1286     }
1287     SetBarringInfo setBarringInfo = {};
1288     setBarringInfo.fac = "AB";
1289     setBarringInfo.oldPassword = "1234";
1290     setBarringInfo.newPassword = "2345";
1291     int32_t ret = g_rilInterface->SetBarringPassword(SLOTID_2, GetSerialId(), setBarringInfo);
1292     WaitFor(WAIT_TIME_SECOND);
1293     EXPECT_EQ(SUCCESS, ret);
1294     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_CALL_SET_BARRING_PASSWORD));
1295 }
1296 
1297 /**
1298  * @tc.number   Telephony_DriverSystem_GetSignalStrength_V1_0100
1299  * @tc.name     Get signal strength
1300  * @tc.desc     Function test
1301  */
1302 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetSignalStrength_V1_0100, Function | MediumTest | Level3)
1303 {
1304     if (!IsReady(SLOTID_1)) {
1305         return;
1306     }
1307     int32_t ret = g_rilInterface->GetSignalStrength(SLOTID_1, GetSerialId());
1308     WaitFor(WAIT_TIME_SECOND);
1309     EXPECT_EQ(SUCCESS, ret);
1310     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_SIGNAL_STRENGTH));
1311 }
1312 
1313 /**
1314  * @tc.number   Telephony_DriverSystem_GetSignalStrength_V1_0200
1315  * @tc.name     Get signal strength
1316  * @tc.desc     Function test
1317  */
1318 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetSignalStrength_V1_0200, Function | MediumTest | Level3)
1319 {
1320     if (!IsReady(SLOTID_2)) {
1321         return;
1322     }
1323     int32_t ret = g_rilInterface->GetSignalStrength(SLOTID_2, GetSerialId());
1324     WaitFor(WAIT_TIME_SECOND);
1325     EXPECT_EQ(SUCCESS, ret);
1326     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_SIGNAL_STRENGTH));
1327 }
1328 
1329 /**
1330  * @tc.number   Telephony_DriverSystem_GetCsRegStatus_V1_0100
1331  * @tc.name     Get cs register status
1332  * @tc.desc     Function test
1333  */
1334 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCsRegStatus_V1_0100, Function | MediumTest | Level3)
1335 {
1336     if (!IsReady(SLOTID_1)) {
1337         return;
1338     }
1339     int32_t ret = g_rilInterface->GetCsRegStatus(SLOTID_1, GetSerialId());
1340     WaitFor(WAIT_TIME_SECOND);
1341     EXPECT_EQ(SUCCESS, ret);
1342     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_CS_REG_STATUS));
1343 }
1344 
1345 /**
1346  * @tc.number   Telephony_DriverSystem_GetCsRegStatus_V1_0200
1347  * @tc.name     Get cs register status
1348  * @tc.desc     Function test
1349  */
1350 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCsRegStatus_V1_0200, Function | MediumTest | Level3)
1351 {
1352     if (!IsReady(SLOTID_2)) {
1353         return;
1354     }
1355     int32_t ret = g_rilInterface->GetCsRegStatus(SLOTID_2, GetSerialId());
1356     WaitFor(WAIT_TIME_SECOND);
1357     EXPECT_EQ(SUCCESS, ret);
1358     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_CS_REG_STATUS));
1359 }
1360 
1361 /**
1362  * @tc.number   Telephony_DriverSystem_GetPsRegStatus_V1_0100
1363  * @tc.name     Get ps register status
1364  * @tc.desc     Function test
1365  */
1366 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetPsRegStatus_V1_0100, Function | MediumTest | Level3)
1367 {
1368     if (!IsReady(SLOTID_1)) {
1369         return;
1370     }
1371     int32_t ret = g_rilInterface->GetPsRegStatus(SLOTID_1, GetSerialId());
1372     WaitFor(WAIT_TIME_SECOND);
1373     EXPECT_EQ(SUCCESS, ret);
1374     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_PS_REG_STATUS));
1375 }
1376 
1377 /**
1378  * @tc.number   Telephony_DriverSystem_GetPsRegStatus_V1_0200
1379  * @tc.name     Get ps register status
1380  * @tc.desc     Function test
1381  */
1382 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetPsRegStatus_V1_0200, Function | MediumTest | Level3)
1383 {
1384     if (!IsReady(SLOTID_2)) {
1385         return;
1386     }
1387     int32_t ret = g_rilInterface->GetPsRegStatus(SLOTID_2, GetSerialId());
1388     WaitFor(WAIT_TIME_SECOND);
1389     EXPECT_EQ(SUCCESS, ret);
1390     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_PS_REG_STATUS));
1391 }
1392 
1393 /**
1394  * @tc.number   Telephony_DriverSystem_GetOperatorInfo_V1_0100
1395  * @tc.name     Get operator info
1396  * @tc.desc     Function test
1397  */
1398 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetOperatorInfo_V1_0100, Function | MediumTest | Level3)
1399 {
1400     if (!IsReady(SLOTID_1)) {
1401         return;
1402     }
1403     int32_t ret = g_rilInterface->GetOperatorInfo(SLOTID_1, GetSerialId());
1404     WaitFor(WAIT_TIME_SECOND);
1405     EXPECT_EQ(SUCCESS, ret);
1406     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_OPERATOR_INFO));
1407 }
1408 
1409 /**
1410  * @tc.number   Telephony_DriverSystem_GetOperatorInfo_V1_0200
1411  * @tc.name     Get operator info
1412  * @tc.desc     Function test
1413  */
1414 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetOperatorInfo_V1_0200, Function | MediumTest | Level3)
1415 {
1416     if (!IsReady(SLOTID_2)) {
1417         return;
1418     }
1419     int32_t ret = g_rilInterface->GetOperatorInfo(SLOTID_2, GetSerialId());
1420     WaitFor(WAIT_TIME_SECOND);
1421     EXPECT_EQ(SUCCESS, ret);
1422     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_OPERATOR_INFO));
1423 }
1424 
1425 /**
1426  * @tc.number   Telephony_DriverSystem_GetNetworkSearchInformation_V1_0100
1427  * @tc.name     Get network search information
1428  * @tc.desc     Function test
1429  */
1430 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetNetworkSearchInformation_V1_0100, Function | MediumTest | Level3)
1431 {
1432     if (!IsReady(SLOTID_1)) {
1433         return;
1434     }
1435     int32_t ret = g_rilInterface->GetNetworkSearchInformation(SLOTID_1, GetSerialId());
1436     WaitFor(WAIT_TIME_SECOND);
1437     EXPECT_EQ(SUCCESS, ret);
1438     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_NETWORK_SEARCH_INFORMATION));
1439 }
1440 
1441 /**
1442  * @tc.number   Telephony_DriverSystem_GetNetworkSearchInformation_V1_0200
1443  * @tc.name     Get network search information
1444  * @tc.desc     Function test
1445  */
1446 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetNetworkSearchInformation_V1_0200, Function | MediumTest | Level3)
1447 {
1448     if (!IsReady(SLOTID_2)) {
1449         return;
1450     }
1451     int32_t ret = g_rilInterface->GetNetworkSearchInformation(SLOTID_2, GetSerialId());
1452     WaitFor(WAIT_TIME_SECOND);
1453     EXPECT_EQ(SUCCESS, ret);
1454     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_NETWORK_SEARCH_INFORMATION));
1455 }
1456 
1457 /**
1458  * @tc.number   Telephony_DriverSystem_GetNetworkSelectionMode_V1_0100
1459  * @tc.name     Get network search selection mode
1460  * @tc.desc     Function test
1461  */
1462 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetNetworkSelectionMode_V1_0100, Function | MediumTest | Level3)
1463 {
1464     if (!IsReady(SLOTID_1)) {
1465         return;
1466     }
1467     int32_t ret = g_rilInterface->GetNetworkSelectionMode(SLOTID_1, GetSerialId());
1468     WaitFor(WAIT_TIME_SECOND);
1469     EXPECT_EQ(SUCCESS, ret);
1470     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_NETWORK_SELECTION_MODE));
1471 }
1472 
1473 /**
1474  * @tc.number   Telephony_DriverSystem_GetNetworkSelectionMode_V1_0200
1475  * @tc.name     Get network search selection mode
1476  * @tc.desc     Function test
1477  */
1478 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetNetworkSelectionMode_V1_0200, Function | MediumTest | Level3)
1479 {
1480     if (!IsReady(SLOTID_2)) {
1481         return;
1482     }
1483     int32_t ret = g_rilInterface->GetNetworkSelectionMode(SLOTID_2, GetSerialId());
1484     WaitFor(WAIT_TIME_SECOND);
1485     EXPECT_EQ(SUCCESS, ret);
1486     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_NETWORK_SELECTION_MODE));
1487 }
1488 
1489 /**
1490  * @tc.number   Telephony_DriverSystem_SetNetworkSelectionMode_V1_0100
1491  * @tc.name     Set network search selection mode
1492  * @tc.desc     Function test
1493  */
1494 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetNetworkSelectionMode_V1_0100, Function | MediumTest | Level3)
1495 {
1496     if (!IsReady(SLOTID_1)) {
1497         return;
1498     }
1499     SetNetworkModeInfo setNetworkModeInfo;
1500     setNetworkModeInfo.selectMode = static_cast<int32_t>(SelectionMode::MODE_TYPE_AUTO);
1501     setNetworkModeInfo.oper = "46000";
1502     int32_t ret = g_rilInterface->SetNetworkSelectionMode(SLOTID_1, GetSerialId(), setNetworkModeInfo);
1503     WaitFor(WAIT_TIME_SECOND);
1504     EXPECT_EQ(SUCCESS, ret);
1505     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_SET_NETWORK_SELECTION_MODE));
1506 }
1507 
1508 /**
1509  * @tc.number   Telephony_DriverSystem_SetNetworkSelectionMode_V1_0200
1510  * @tc.name     Set network search selection mode
1511  * @tc.desc     Function test
1512  */
1513 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetNetworkSelectionMode_V1_0200, Function | MediumTest | Level3)
1514 {
1515     if (!IsReady(SLOTID_2)) {
1516         return;
1517     }
1518     SetNetworkModeInfo setNetworkModeInfo;
1519     setNetworkModeInfo.selectMode = static_cast<int32_t>(SelectionMode::MODE_TYPE_AUTO);
1520     setNetworkModeInfo.oper = "46000";
1521     int32_t ret = g_rilInterface->SetNetworkSelectionMode(SLOTID_2, GetSerialId(), setNetworkModeInfo);
1522     WaitFor(WAIT_TIME_SECOND);
1523     EXPECT_EQ(SUCCESS, ret);
1524     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_SET_NETWORK_SELECTION_MODE));
1525 }
1526 
1527 /**
1528  * @tc.number   Telephony_DriverSystem_SetPreferredNetwork_V1_0100
1529  * @tc.name     Set preferred network
1530  * @tc.desc     Function test
1531  */
1532 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetPreferredNetwork_V1_0100, Function | MediumTest | Level3)
1533 {
1534     if (!IsReady(SLOTID_1)) {
1535         return;
1536     }
1537     int32_t ret = g_rilInterface->SetPreferredNetwork(
1538         SLOTID_1, GetSerialId(), static_cast<int32_t>(PreferredNetworkMode::CORE_NETWORK_MODE_LTE));
1539     WaitFor(WAIT_TIME_SECOND);
1540     EXPECT_EQ(SUCCESS, ret);
1541     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_SET_PREFERRED_NETWORK));
1542 }
1543 
1544 /**
1545  * @tc.number   Telephony_DriverSystem_SetPreferredNetwork_V1_0200
1546  * @tc.name     Set preferred network
1547  * @tc.desc     Function test
1548  */
1549 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetPreferredNetwork_V1_0200, Function | MediumTest | Level3)
1550 {
1551     if (!IsReady(SLOTID_2)) {
1552         return;
1553     }
1554     int32_t ret = g_rilInterface->SetPreferredNetwork(
1555         SLOTID_2, GetSerialId(), static_cast<int32_t>(PreferredNetworkMode::CORE_NETWORK_MODE_LTE));
1556     WaitFor(WAIT_TIME_SECOND);
1557     EXPECT_EQ(SUCCESS, ret);
1558     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_SET_PREFERRED_NETWORK));
1559 }
1560 
1561 /**
1562  * @tc.number   Telephony_DriverSystem_GetPreferredNetwork_V1_0100
1563  * @tc.name     Get preferred network
1564  * @tc.desc     Function test
1565  */
1566 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetPreferredNetwork_V1_0100, Function | MediumTest | Level3)
1567 {
1568     if (!IsReady(SLOTID_1)) {
1569         return;
1570     }
1571     int32_t ret = g_rilInterface->GetPreferredNetwork(SLOTID_1, GetSerialId());
1572     WaitFor(WAIT_TIME_SECOND);
1573     EXPECT_EQ(SUCCESS, ret);
1574     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_PREFERRED_NETWORK));
1575 }
1576 
1577 /**
1578  * @tc.number   Telephony_DriverSystem_GetPreferredNetwork_V1_0200
1579  * @tc.name     Get preferred network
1580  * @tc.desc     Function test
1581  */
1582 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetPreferredNetwork_V1_0200, Function | MediumTest | Level3)
1583 {
1584     if (!IsReady(SLOTID_2)) {
1585         return;
1586     }
1587     int32_t ret = g_rilInterface->GetPreferredNetwork(SLOTID_2, GetSerialId());
1588     WaitFor(WAIT_TIME_SECOND);
1589     EXPECT_EQ(SUCCESS, ret);
1590     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_PREFERRED_NETWORK));
1591 }
1592 
1593 /**
1594  * @tc.number   Telephony_DriverSystem_GetCellInfoList_V1_0100
1595  * @tc.name     Get cell information list
1596  * @tc.desc     Function test
1597  */
1598 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCellInfoList_V1_0100, Function | MediumTest | Level3)
1599 {
1600     if (!IsReady(SLOTID_1)) {
1601         return;
1602     }
1603     int32_t ret = g_rilInterface->GetNeighboringCellInfoList(SLOTID_1, GetSerialId());
1604     WaitFor(WAIT_TIME_SECOND);
1605     EXPECT_EQ(SUCCESS, ret);
1606     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_NEIGHBORING_CELLINFO_LIST));
1607 }
1608 
1609 /**
1610  * @tc.number   Telephony_DriverSystem_GetCellInfoList_V1_0200
1611  * @tc.name     Get cell information list
1612  * @tc.desc     Function test
1613  */
1614 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCellInfoList_V1_0200, Function | MediumTest | Level3)
1615 {
1616     if (!IsReady(SLOTID_2)) {
1617         return;
1618     }
1619     int32_t ret = g_rilInterface->GetNeighboringCellInfoList(SLOTID_2, GetSerialId());
1620     WaitFor(WAIT_TIME_SECOND);
1621     EXPECT_EQ(SUCCESS, ret);
1622     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_NEIGHBORING_CELLINFO_LIST));
1623 }
1624 
1625 /**
1626  * @tc.number   Telephony_DriverSystem_GetCurrentCellInfo_V1_0100
1627  * @tc.name     Get current cell information
1628  * @tc.desc     Function test
1629  */
1630 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCurrentCellInfo_V1_0100, Function | MediumTest | Level3)
1631 {
1632     if (!IsReady(SLOTID_1)) {
1633         return;
1634     }
1635     int32_t ret = g_rilInterface->GetCurrentCellInfo(SLOTID_1, GetSerialId());
1636     WaitFor(WAIT_TIME_SECOND);
1637     EXPECT_EQ(SUCCESS, ret);
1638     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_CURRENT_CELL_INFO));
1639 }
1640 
1641 /**
1642  * @tc.number   Telephony_DriverSystem_GetCurrentCellInfo_V1_0200
1643  * @tc.name     Get current cell information
1644  * @tc.desc     Function test
1645  */
1646 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCurrentCellInfo_V1_0200, Function | MediumTest | Level3)
1647 {
1648     if (!IsReady(SLOTID_2)) {
1649         return;
1650     }
1651     int32_t ret = g_rilInterface->GetCurrentCellInfo(SLOTID_2, GetSerialId());
1652     WaitFor(WAIT_TIME_SECOND);
1653     EXPECT_EQ(SUCCESS, ret);
1654     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_CURRENT_CELL_INFO));
1655 }
1656 
1657 /**
1658  * @tc.number   Telephony_DriverSystem_GetPhysicalChannelConfig_V1_0100
1659  * @tc.name     Get physical channel config
1660  * @tc.desc     Function test
1661  */
1662 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetPhysicalChannelConfig_V1_0100, Function | MediumTest | Level3)
1663 {
1664     if (!IsReady(SLOTID_1)) {
1665         return;
1666     }
1667     int32_t ret = g_rilInterface->GetPhysicalChannelConfig(SLOTID_1, GetSerialId());
1668     WaitFor(WAIT_TIME_SECOND);
1669     EXPECT_EQ(SUCCESS, ret);
1670     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG));
1671 }
1672 
1673 /**
1674  * @tc.number   Telephony_DriverSystem_GetPhysicalChannelConfig_V1_0200
1675  * @tc.name     Get physical channel config
1676  * @tc.desc     Function test
1677  */
1678 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetPhysicalChannelConfig_V1_0200, Function | MediumTest | Level3)
1679 {
1680     if (!IsReady(SLOTID_2)) {
1681         return;
1682     }
1683     int32_t ret = g_rilInterface->GetPhysicalChannelConfig(SLOTID_2, GetSerialId());
1684     WaitFor(WAIT_TIME_SECOND);
1685     EXPECT_EQ(SUCCESS, ret);
1686     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG));
1687 }
1688 
1689 /**
1690  * @tc.number   Telephony_DriverSystem_SetLocateUpdates_V1_0100
1691  * @tc.name     Set locate updates
1692  * @tc.desc     Function test
1693  */
1694 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetLocateUpdates_V1_0100, Function | MediumTest | Level3)
1695 {
1696     if (!IsReady(SLOTID_1)) {
1697         return;
1698     }
1699     int32_t ret =
1700         g_rilInterface->SetLocateUpdates(SLOTID_1, GetSerialId(), RilRegNotifyMode::REG_NOTIFY_STAT_LAC_CELLID);
1701     WaitFor(WAIT_TIME_SECOND);
1702     EXPECT_EQ(SUCCESS, ret);
1703     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_SET_LOCATE_UPDATES));
1704 }
1705 
1706 /**
1707  * @tc.number   Telephony_DriverSystem_SetLocateUpdates_V1_0200
1708  * @tc.name     Set locate updates
1709  * @tc.desc     Function test
1710  */
1711 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetLocateUpdates_V1_0200, Function | MediumTest | Level3)
1712 {
1713     if (!IsReady(SLOTID_2)) {
1714         return;
1715     }
1716     int32_t ret =
1717         g_rilInterface->SetLocateUpdates(SLOTID_2, GetSerialId(), RilRegNotifyMode::REG_NOTIFY_STAT_LAC_CELLID);
1718     WaitFor(WAIT_TIME_SECOND);
1719     EXPECT_EQ(SUCCESS, ret);
1720     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_SET_LOCATE_UPDATES));
1721 }
1722 
1723 /**
1724  * @tc.number   Telephony_DriverSystem_SetNotificationFilter_V1_0100
1725  * @tc.name     SetNotificationFilter
1726  * @tc.desc     Function test
1727  */
1728 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetNotificationFilter_V1_0100, Function | MediumTest | Level3)
1729 {
1730     if (!IsReady(SLOTID_1)) {
1731         return;
1732     }
1733     int32_t ret = g_rilInterface->SetNotificationFilter(
1734         SLOTID_1, GetSerialId(), static_cast<int32_t>(NotificationFilter::NOTIFICATION_FILTER_ALL));
1735     WaitFor(WAIT_TIME_SECOND);
1736     EXPECT_EQ(SUCCESS, ret);
1737     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_SET_NOTIFICATION_FILTER));
1738 }
1739 
1740 /**
1741  * @tc.number   Telephony_DriverSystem_SetNotificationFilter_V1_0200
1742  * @tc.name     SetNotificationFilter
1743  * @tc.desc     Function test
1744  */
1745 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetNotificationFilter_V1_0200, Function | MediumTest | Level3)
1746 {
1747     if (!IsReady(SLOTID_2)) {
1748         return;
1749     }
1750     int32_t ret = g_rilInterface->SetNotificationFilter(
1751         SLOTID_2, GetSerialId(), static_cast<int32_t>(NotificationFilter::NOTIFICATION_FILTER_ALL));
1752     WaitFor(WAIT_TIME_SECOND);
1753     EXPECT_EQ(SUCCESS, ret);
1754     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_SET_NOTIFICATION_FILTER));
1755 }
1756 
1757 /**
1758  * @tc.number   Telephony_DriverSystem_SetDeviceState_V1_0100
1759  * @tc.name     Set device state
1760  * @tc.desc     Function test
1761  */
1762 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetDeviceState_V1_0100, Function | MediumTest | Level3)
1763 {
1764     if (!IsReady(SLOTID_1)) {
1765         return;
1766     }
1767     int32_t ret = g_rilInterface->SetDeviceState(
1768         SLOTID_1, GetSerialId(), static_cast<int32_t>(DeviceStateType::LOW_DATA_STATE), 0);
1769     WaitFor(WAIT_TIME_SECOND);
1770     EXPECT_EQ(SUCCESS, ret);
1771     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_SET_DEVICE_STATE));
1772 }
1773 
1774 /**
1775  * @tc.number   Telephony_DriverSystem_SetDeviceState_V1_0200
1776  * @tc.name     Set device state
1777  * @tc.desc     Function test
1778  */
1779 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetDeviceState_V1_0200, Function | MediumTest | Level3)
1780 {
1781     if (!IsReady(SLOTID_2)) {
1782         return;
1783     }
1784     int32_t ret = g_rilInterface->SetDeviceState(
1785         SLOTID_2, GetSerialId(), static_cast<int32_t>(DeviceStateType::LOW_DATA_STATE), 0);
1786     WaitFor(WAIT_TIME_SECOND);
1787     EXPECT_EQ(SUCCESS, ret);
1788     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_NETWORK_SET_DEVICE_STATE));
1789 }
1790 
1791 /**
1792  * @tc.number   Telephony_DriverSystem_ShutDown_V1_0100
1793  * @tc.name     Shut down
1794  * @tc.desc     Function test
1795  */
1796 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_ShutDown_V1_0100, Function | MediumTest | Level3)
1797 {
1798     if (!IsReady(SLOTID_1)) {
1799         return;
1800     }
1801     int32_t ret = g_rilInterface->ShutDown(SLOTID_1, GetSerialId());
1802     WaitFor(WAIT_TIME_SECOND);
1803     EXPECT_EQ(SUCCESS, ret);
1804     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_SHUT_DOWN));
1805 }
1806 
1807 /**
1808  * @tc.number   Telephony_DriverSystem_ShutDown_V1_0200
1809  * @tc.name     Shut down
1810  * @tc.desc     Function test
1811  */
1812 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_ShutDown_V1_0200, Function | MediumTest | Level3)
1813 {
1814     if (!IsReady(SLOTID_2)) {
1815         return;
1816     }
1817     int32_t ret = g_rilInterface->ShutDown(SLOTID_2, GetSerialId());
1818     WaitFor(WAIT_TIME_SECOND);
1819     EXPECT_EQ(SUCCESS, ret);
1820     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_SHUT_DOWN));
1821 }
1822 
1823 /**
1824  * @tc.number   Telephony_DriverSystem_SetRadioState_V1_0100
1825  * @tc.name     Set radio state
1826  * @tc.desc     Function test
1827  */
1828 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetRadioState_V1_0100, Function | MediumTest | Level3)
1829 {
1830     if (!IsReady(SLOTID_1)) {
1831         return;
1832     }
1833     int32_t ret = g_rilInterface->SetRadioState(SLOTID_1, GetSerialId(), 1, 0);
1834     WaitFor(WAIT_TIME_SECOND);
1835     EXPECT_EQ(SUCCESS, ret);
1836     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_SET_RADIO_STATUS));
1837 }
1838 
1839 /**
1840  * @tc.number   Telephony_DriverSystem_SetRadioState_V1_0200
1841  * @tc.name     Set radio state
1842  * @tc.desc     Function test
1843  */
1844 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetRadioState_V1_0200, Function | MediumTest | Level3)
1845 {
1846     if (!IsReady(SLOTID_2)) {
1847         return;
1848     }
1849     int32_t ret = g_rilInterface->SetRadioState(SLOTID_1, GetSerialId(), 1, 0);
1850     WaitFor(WAIT_TIME_SECOND);
1851     EXPECT_EQ(SUCCESS, ret);
1852     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_SET_RADIO_STATUS));
1853 }
1854 
1855 /**
1856  * @tc.number   Telephony_DriverSystem_GetRadioState_V1_0100
1857  * @tc.name     Get radio state
1858  * @tc.desc     Function test
1859  */
1860 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetRadioState_V1_0100, Function | MediumTest | Level3)
1861 {
1862     if (!IsReady(SLOTID_1)) {
1863         return;
1864     }
1865     int32_t ret = g_rilInterface->GetRadioState(SLOTID_1, GetSerialId());
1866     WaitFor(WAIT_TIME_SECOND);
1867     EXPECT_EQ(SUCCESS, ret);
1868     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_GET_RADIO_STATUS));
1869 }
1870 
1871 /**
1872  * @tc.number   Telephony_DriverSystem_GetRadioState_V1_0200
1873  * @tc.name     Get radio state
1874  * @tc.desc     Function test
1875  */
1876 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetRadioState_V1_0200, Function | MediumTest | Level3)
1877 {
1878     if (!IsReady(SLOTID_2)) {
1879         return;
1880     }
1881     int32_t ret = g_rilInterface->GetRadioState(SLOTID_2, GetSerialId());
1882     WaitFor(WAIT_TIME_SECOND);
1883     EXPECT_EQ(SUCCESS, ret);
1884     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_GET_RADIO_STATUS));
1885 }
1886 
1887 /**
1888  * @tc.number   Telephony_DriverSystem_GetImei_V1_0100
1889  * @tc.name     Get imei
1890  * @tc.desc     Function test
1891  */
1892 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetImei_V1_0100, Function | MediumTest | Level3)
1893 {
1894     if (!IsReady(SLOTID_1)) {
1895         return;
1896     }
1897     int32_t ret = g_rilInterface->GetImei(SLOTID_1, GetSerialId());
1898     WaitFor(WAIT_TIME_SECOND);
1899     EXPECT_EQ(SUCCESS, ret);
1900     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_GET_IMEI));
1901 }
1902 
1903 /**
1904  * @tc.number   Telephony_DriverSystem_GetImei_V1_0200
1905  * @tc.name     Get imei
1906  * @tc.desc     Function test
1907  */
1908 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetImei_V1_0200, Function | MediumTest | Level3)
1909 {
1910     if (!IsReady(SLOTID_2)) {
1911         return;
1912     }
1913     int32_t ret = g_rilInterface->GetImei(SLOTID_2, GetSerialId());
1914     WaitFor(WAIT_TIME_SECOND);
1915     EXPECT_EQ(SUCCESS, ret);
1916     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_GET_IMEI));
1917 }
1918 
1919 /**
1920  * @tc.number   Telephony_DriverSystem_GetMeid_V1_0100
1921  * @tc.name     Get meid
1922  * @tc.desc     Function test
1923  */
1924 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetMeid_V1_0100, Function | MediumTest | Level3)
1925 {
1926     if (!IsReady(SLOTID_1)) {
1927         return;
1928     }
1929     int32_t ret = g_rilInterface->GetMeid(SLOTID_1, GetSerialId());
1930     WaitFor(WAIT_TIME_SECOND);
1931     EXPECT_EQ(SUCCESS, ret);
1932     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_GET_MEID));
1933 }
1934 
1935 /**
1936  * @tc.number   Telephony_DriverSystem_GetMeid_V1_0200
1937  * @tc.name     Get meid
1938  * @tc.desc     Function test
1939  */
1940 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetMeid_V1_0200, Function | MediumTest | Level3)
1941 {
1942     if (!IsReady(SLOTID_2)) {
1943         return;
1944     }
1945     int32_t ret = g_rilInterface->GetMeid(SLOTID_2, GetSerialId());
1946     WaitFor(WAIT_TIME_SECOND);
1947     EXPECT_EQ(SUCCESS, ret);
1948     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_GET_MEID));
1949 }
1950 
1951 /**
1952  * @tc.number   Telephony_DriverSystem_GetBasebandVersion_V1_0100
1953  * @tc.name     Get base band version
1954  * @tc.desc     Function test
1955  */
1956 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetBasebandVersion_V1_0100, Function | MediumTest | Level3)
1957 {
1958     if (!IsReady(SLOTID_1)) {
1959         return;
1960     }
1961     int32_t ret = g_rilInterface->GetBasebandVersion(SLOTID_1, GetSerialId());
1962     WaitFor(WAIT_TIME_SECOND);
1963     EXPECT_EQ(SUCCESS, ret);
1964     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_GET_BASEBAND_VERSION));
1965 }
1966 
1967 /**
1968  * @tc.number   Telephony_DriverSystem_GetBasebandVersion_V1_0200
1969  * @tc.name     Get base band version
1970  * @tc.desc     Function test
1971  */
1972 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetBasebandVersion_V1_0200, Function | MediumTest | Level3)
1973 {
1974     if (!IsReady(SLOTID_2)) {
1975         return;
1976     }
1977     int32_t ret = g_rilInterface->GetBasebandVersion(SLOTID_2, GetSerialId());
1978     WaitFor(WAIT_TIME_SECOND);
1979     EXPECT_EQ(SUCCESS, ret);
1980     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_GET_BASEBAND_VERSION));
1981 }
1982 
1983 /**
1984  * @tc.number   Telephony_DriverSystem_GetVoiceRadioTechnology_V1_0100
1985  * @tc.name     Get voice radio technology
1986  * @tc.desc     Function test
1987  */
1988 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetVoiceRadioTechnology_V1_0100, Function | MediumTest | Level3)
1989 {
1990     if (!IsReady(SLOTID_1)) {
1991         return;
1992     }
1993     int32_t ret = g_rilInterface->GetVoiceRadioTechnology(SLOTID_1, GetSerialId());
1994     WaitFor(WAIT_TIME_SECOND);
1995     EXPECT_EQ(SUCCESS, ret);
1996     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_GET_VOICE_RADIO));
1997 }
1998 
1999 /**
2000  * @tc.number   Telephony_DriverSystem_GetVoiceRadioTechnology_V1_0200
2001  * @tc.name     Get voice radio technology
2002  * @tc.desc     Function test
2003  */
2004 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetVoiceRadioTechnology_V1_0200, Function | MediumTest | Level3)
2005 {
2006     if (!IsReady(SLOTID_2)) {
2007         return;
2008     }
2009     int32_t ret = g_rilInterface->GetVoiceRadioTechnology(SLOTID_2, GetSerialId());
2010     WaitFor(WAIT_TIME_SECOND);
2011     EXPECT_EQ(SUCCESS, ret);
2012     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_MODEM_GET_VOICE_RADIO));
2013 }
2014 
2015 /**
2016  * @tc.number   Telephony_DriverSystem_ActivatePdpContext_V1_0100
2017  * @tc.name     Activate pdp context
2018  * @tc.desc     Function test
2019  */
2020 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_ActivatePdpContext_V1_0100, Function | MediumTest | Level3)
2021 {
2022     if (!IsReady(SLOTID_1)) {
2023         return;
2024     }
2025     int32_t serialId = GetSerialId();
2026     DataProfileDataInfo dataProfileInfo;
2027     dataProfileInfo.profileId = 0;
2028     dataProfileInfo.password = "";
2029     dataProfileInfo.authenticationType = 0;
2030     dataProfileInfo.userName = "";
2031     dataProfileInfo.apn = "cmnet";
2032     dataProfileInfo.protocol = "IPV4V6";
2033     dataProfileInfo.roamingProtocol = "IPV4V6";
2034     DataCallInfo dataCallInfo;
2035     dataCallInfo.serial = serialId;
2036     dataCallInfo.radioTechnology = 0;
2037     dataCallInfo.dataProfileInfo = dataProfileInfo;
2038     dataCallInfo.roamingAllowed = true;
2039     dataCallInfo.isRoaming = false;
2040     int32_t ret = g_rilInterface->ActivatePdpContext(SLOTID_1, serialId, dataCallInfo);
2041     WaitFor(WAIT_TIME_SECOND);
2042     EXPECT_EQ(SUCCESS, ret);
2043     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_ACTIVATE_PDP_CONTEXT));
2044 }
2045 
2046 /**
2047  * @tc.number   Telephony_DriverSystem_ActivatePdpContext_V1_0200
2048  * @tc.name     Activate pdp context
2049  * @tc.desc     Function test
2050  */
2051 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_ActivatePdpContext_V1_0200, Function | MediumTest | Level3)
2052 {
2053     if (!IsReady(SLOTID_2)) {
2054         return;
2055     }
2056     int32_t serialId = GetSerialId();
2057     DataProfileDataInfo dataProfileInfo;
2058     dataProfileInfo.profileId = 0;
2059     dataProfileInfo.password = "";
2060     dataProfileInfo.authenticationType = 0;
2061     dataProfileInfo.userName = "";
2062     dataProfileInfo.apn = "cmnet";
2063     dataProfileInfo.protocol = "IPV4V6";
2064     dataProfileInfo.roamingProtocol = "IPV4V6";
2065     DataCallInfo dataCallInfo;
2066     dataCallInfo.serial = serialId;
2067     dataCallInfo.radioTechnology = 0;
2068     dataCallInfo.dataProfileInfo = dataProfileInfo;
2069     dataCallInfo.roamingAllowed = true;
2070     dataCallInfo.isRoaming = false;
2071     int32_t ret = g_rilInterface->ActivatePdpContext(SLOTID_2, serialId, dataCallInfo);
2072     WaitFor(WAIT_TIME_SECOND);
2073     EXPECT_EQ(SUCCESS, ret);
2074     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_ACTIVATE_PDP_CONTEXT));
2075 }
2076 
2077 /**
2078  * @tc.number   Telephony_DriverSystem_DeactivatePdpContext_V1_0100
2079  * @tc.name     Deactivate pdp context
2080  * @tc.desc     Function test
2081  */
2082 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_DeactivatePdpContext_V1_0100, Function | MediumTest | Level3)
2083 {
2084     if (!IsReady(SLOTID_1)) {
2085         return;
2086     }
2087     int32_t serialId = GetSerialId();
2088     UniInfo uniInfo;
2089     uniInfo.serial = serialId;
2090     uniInfo.gsmIndex = CID;
2091     uniInfo.arg1 = REASON;
2092     int32_t ret = g_rilInterface->DeactivatePdpContext(SLOTID_1, serialId, uniInfo);
2093     WaitFor(WAIT_TIME_SECOND);
2094     EXPECT_EQ(SUCCESS, ret);
2095     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_DEACTIVATE_PDP_CONTEXT));
2096 }
2097 
2098 /**
2099  * @tc.number   Telephony_DriverSystem_DeactivatePdpContext_V1_0200
2100  * @tc.name     Deactivate pdp context
2101  * @tc.desc     Function test
2102  */
2103 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_DeactivatePdpContext_V1_0200, Function | MediumTest | Level3)
2104 {
2105     if (!IsReady(SLOTID_2)) {
2106         return;
2107     }
2108     int32_t serialId = GetSerialId();
2109     UniInfo uniInfo;
2110     uniInfo.serial = serialId;
2111     uniInfo.gsmIndex = CID;
2112     uniInfo.arg1 = REASON;
2113     int32_t ret = g_rilInterface->DeactivatePdpContext(SLOTID_2, serialId, uniInfo);
2114     WaitFor(WAIT_TIME_SECOND);
2115     EXPECT_EQ(SUCCESS, ret);
2116     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_DEACTIVATE_PDP_CONTEXT));
2117 }
2118 
2119 /**
2120  * @tc.number   Telephony_DriverSystem_GetPdpContextList_V1_0100
2121  * @tc.name     Get pdp context list
2122  * @tc.desc     Function test
2123  */
2124 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetPdpContextList_V1_0100, Function | MediumTest | Level3)
2125 {
2126     if (!IsReady(SLOTID_1)) {
2127         return;
2128     }
2129     int32_t serialId = GetSerialId();
2130     UniInfo uniInfo;
2131     uniInfo.serial = serialId;
2132     int32_t ret = g_rilInterface->GetPdpContextList(SLOTID_1, serialId, uniInfo);
2133     WaitFor(WAIT_TIME_SECOND);
2134     EXPECT_EQ(SUCCESS, ret);
2135     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_GET_PDP_CONTEXT_LIST));
2136 }
2137 
2138 /**
2139  * @tc.number   Telephony_DriverSystem_GetPdpContextList_V1_0200
2140  * @tc.name     Get pdp context list
2141  * @tc.desc     Function test
2142  */
2143 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetPdpContextList_V1_0200, Function | MediumTest | Level3)
2144 {
2145     if (!IsReady(SLOTID_2)) {
2146         return;
2147     }
2148     int32_t serialId = GetSerialId();
2149     UniInfo uniInfo;
2150     uniInfo.serial = serialId;
2151     int32_t ret = g_rilInterface->GetPdpContextList(SLOTID_2, serialId, uniInfo);
2152     WaitFor(WAIT_TIME_SECOND);
2153     EXPECT_EQ(SUCCESS, ret);
2154     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_GET_PDP_CONTEXT_LIST));
2155 }
2156 
2157 /**
2158  * @tc.number   Telephony_DriverSystem_SetInitApnInfo_V1_0100
2159  * @tc.name     Set init apn info
2160  * @tc.desc     Function test
2161  */
2162 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetInitApnInfo_V1_0100, Function | MediumTest | Level3)
2163 {
2164     if (!IsReady(SLOTID_1)) {
2165         return;
2166     }
2167     int32_t serialId = GetSerialId();
2168     DataProfileDataInfo dataProfileInfo;
2169     dataProfileInfo.profileId = 0;
2170     dataProfileInfo.password = "";
2171     dataProfileInfo.authenticationType = 0;
2172     dataProfileInfo.userName = "";
2173     dataProfileInfo.apn = "cmnet";
2174     dataProfileInfo.protocol = "IPV4V6";
2175     dataProfileInfo.roamingProtocol = "IPV4V6";
2176     dataProfileInfo.serial = serialId;
2177     int32_t ret = g_rilInterface->SetInitApnInfo(SLOTID_1, serialId, dataProfileInfo);
2178     WaitFor(WAIT_TIME_SECOND_LONG);
2179     EXPECT_EQ(SUCCESS, ret);
2180     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_SET_INIT_APN_INFO));
2181 }
2182 
2183 /**
2184  * @tc.number   Telephony_DriverSystem_SetInitApnInfo_V1_0200
2185  * @tc.name     Set init apn info
2186  * @tc.desc     Function test
2187  */
2188 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetInitApnInfo_V1_0200, Function | MediumTest | Level3)
2189 {
2190     if (!IsReady(SLOTID_2)) {
2191         return;
2192     }
2193     int32_t serialId = GetSerialId();
2194     DataProfileDataInfo dataProfileInfo;
2195     dataProfileInfo.profileId = 0;
2196     dataProfileInfo.password = "";
2197     dataProfileInfo.authenticationType = 0;
2198     dataProfileInfo.userName = "";
2199     dataProfileInfo.apn = "cmnet";
2200     dataProfileInfo.protocol = "IPV4V6";
2201     dataProfileInfo.roamingProtocol = "IPV4V6";
2202     dataProfileInfo.serial = serialId;
2203     int32_t ret = g_rilInterface->SetInitApnInfo(SLOTID_2, serialId, dataProfileInfo);
2204     WaitFor(WAIT_TIME_SECOND_LONG);
2205     EXPECT_EQ(SUCCESS, ret);
2206     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_SET_INIT_APN_INFO));
2207 }
2208 
2209 /**
2210  * @tc.number   Telephony_DriverSystem_GetLinkBandwidthInfo_V1_0100
2211  * @tc.name     Get link band width info
2212  * @tc.desc     Function test
2213  */
2214 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetLinkBandwidthInfo_V1_0100, Function | MediumTest | Level3)
2215 {
2216     if (!IsReady(SLOTID_1)) {
2217         return;
2218     }
2219     int32_t ret = g_rilInterface->GetLinkBandwidthInfo(SLOTID_1, GetSerialId(), CID);
2220     WaitFor(WAIT_TIME_SECOND);
2221     EXPECT_EQ(SUCCESS, ret);
2222     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_GET_LINK_BANDWIDTH_INFO));
2223 }
2224 
2225 /**
2226  * @tc.number   Telephony_DriverSystem_GetLinkBandwidthInfo_V1_0200
2227  * @tc.name     Get link band width info
2228  * @tc.desc     Function test
2229  */
2230 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetLinkBandwidthInfo_V1_0200, Function | MediumTest | Level3)
2231 {
2232     if (!IsReady(SLOTID_2)) {
2233         return;
2234     }
2235     int32_t ret = g_rilInterface->GetLinkBandwidthInfo(SLOTID_2, GetSerialId(), CID);
2236     WaitFor(WAIT_TIME_SECOND);
2237     EXPECT_EQ(SUCCESS, ret);
2238     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_GET_LINK_BANDWIDTH_INFO));
2239 }
2240 
2241 /**
2242  * @tc.number   Telephony_DriverSystem_SetLinkBandwidthReportingRule_V1_0100
2243  * @tc.name     Set link band width reporting rule
2244  * @tc.desc     Function test
2245  */
2246 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetLinkBandwidthReportingRule_V1_0100, Function | MediumTest | Level3)
2247 {
2248     if (!IsReady(SLOTID_1)) {
2249         return;
2250     }
2251     int32_t serialId = GetSerialId();
2252     uint32_t uplinkKbpsSize = sizeof(MAX_UPLINK_LINK_BANDWIDTH) / sizeof(int32_t);
2253     uint32_t downlinkKbpsSize = sizeof(MAX_DOWNLINK_LINK_BANDWIDTH) / sizeof(int32_t);
2254     DataLinkBandwidthReportingRule dLinkBandwidth;
2255     dLinkBandwidth.serial = serialId;
2256     dLinkBandwidth.rat = static_cast<int32_t>(RatType::NETWORK_TYPE_LTE);
2257     dLinkBandwidth.delayMs = BANDWIDTH_HYSTERESIS_MS;
2258     dLinkBandwidth.delayUplinkKbps = BANDWIDTH_HYSTERESIS_KBPS;
2259     dLinkBandwidth.delayDownlinkKbps = BANDWIDTH_HYSTERESIS_KBPS;
2260     dLinkBandwidth.maximumUplinkKbpsSize = uplinkKbpsSize;
2261     dLinkBandwidth.maximumDownlinkKbpsSize = downlinkKbpsSize;
2262     for (uint32_t i = 0; i < uplinkKbpsSize; i++) {
2263         dLinkBandwidth.maximumUplinkKbps.push_back(MAX_UPLINK_LINK_BANDWIDTH[i]);
2264     }
2265     for (uint32_t i = 0; i < downlinkKbpsSize; i++) {
2266         dLinkBandwidth.maximumDownlinkKbps.push_back(MAX_DOWNLINK_LINK_BANDWIDTH[i]);
2267     }
2268     int32_t ret = g_rilInterface->SetLinkBandwidthReportingRule(SLOTID_1, GetSerialId(), dLinkBandwidth);
2269     WaitFor(WAIT_TIME_SECOND);
2270     EXPECT_EQ(SUCCESS, ret);
2271     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_SET_LINK_BANDWIDTH_REPORTING_RULE));
2272 }
2273 
2274 /**
2275  * @tc.number   Telephony_DriverSystem_SetLinkBandwidthReportingRule_V1_0200
2276  * @tc.name     Set link band width reporting rule
2277  * @tc.desc     Function test
2278  */
2279 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetLinkBandwidthReportingRule_V1_0200, Function | MediumTest | Level3)
2280 {
2281     if (!IsReady(SLOTID_2)) {
2282         return;
2283     }
2284     int32_t serialId = GetSerialId();
2285     uint32_t uplinkKbpsSize = sizeof(MAX_UPLINK_LINK_BANDWIDTH) / sizeof(int32_t);
2286     uint32_t downlinkKbpsSize = sizeof(MAX_DOWNLINK_LINK_BANDWIDTH) / sizeof(int32_t);
2287     DataLinkBandwidthReportingRule dLinkBandwidth;
2288     dLinkBandwidth.serial = serialId;
2289     dLinkBandwidth.rat = static_cast<int32_t>(RatType::NETWORK_TYPE_LTE);
2290     dLinkBandwidth.delayMs = BANDWIDTH_HYSTERESIS_MS;
2291     dLinkBandwidth.delayUplinkKbps = BANDWIDTH_HYSTERESIS_KBPS;
2292     dLinkBandwidth.delayDownlinkKbps = BANDWIDTH_HYSTERESIS_KBPS;
2293     dLinkBandwidth.maximumUplinkKbpsSize = uplinkKbpsSize;
2294     dLinkBandwidth.maximumDownlinkKbpsSize = downlinkKbpsSize;
2295     for (uint32_t i = 0; i < uplinkKbpsSize; i++) {
2296         dLinkBandwidth.maximumUplinkKbps.push_back(MAX_UPLINK_LINK_BANDWIDTH[i]);
2297     }
2298     for (uint32_t i = 0; i < downlinkKbpsSize; i++) {
2299         dLinkBandwidth.maximumDownlinkKbps.push_back(MAX_DOWNLINK_LINK_BANDWIDTH[i]);
2300     }
2301     int32_t ret = g_rilInterface->SetLinkBandwidthReportingRule(SLOTID_2, GetSerialId(), dLinkBandwidth);
2302     WaitFor(WAIT_TIME_SECOND);
2303     EXPECT_EQ(SUCCESS, ret);
2304     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_SET_LINK_BANDWIDTH_REPORTING_RULE));
2305 }
2306 
2307 /**
2308  * @tc.number   Telephony_DriverSystem_SetDataPermitted_V1_0100
2309  * @tc.name     Set data permitted
2310  * @tc.desc     Function test
2311  */
2312 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetDataPermitted_V1_0100, Function | MediumTest | Level3)
2313 {
2314     if (!IsReady(SLOTID_1)) {
2315         return;
2316     }
2317     int32_t ret = g_rilInterface->SetDataPermitted(SLOTID_1, GetSerialId(), 1);
2318     WaitFor(WAIT_TIME_SECOND);
2319     EXPECT_EQ(SUCCESS, ret);
2320     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_SET_DATA_PERMITTED));
2321 }
2322 
2323 /**
2324  * @tc.number   Telephony_DriverSystem_SetDataPermitted_V1_0200
2325  * @tc.name     Set data permitted
2326  * @tc.desc     Function test
2327  */
2328 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetDataPermitted_V1_0200, Function | MediumTest | Level3)
2329 {
2330     if (!IsReady(SLOTID_2)) {
2331         return;
2332     }
2333     int32_t ret = g_rilInterface->SetDataPermitted(SLOTID_2, GetSerialId(), 1);
2334     WaitFor(WAIT_TIME_SECOND);
2335     EXPECT_EQ(SUCCESS, ret);
2336     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_SET_DATA_PERMITTED));
2337 }
2338 
2339 /**
2340  * @tc.number   Telephony_DriverSystem_SetDataProfileInfo_V1_0100
2341  * @tc.name     Set data profile info
2342  * @tc.desc     Function test
2343  */
2344 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetDataProfileInfo_V1_0100, Function | MediumTest | Level3)
2345 {
2346     if (!IsReady(SLOTID_1)) {
2347         return;
2348     }
2349     int32_t serialId = GetSerialId();
2350     DataProfilesInfo dataProfilesInfo;
2351     dataProfilesInfo.serial = serialId;
2352     dataProfilesInfo.profilesSize = 1;
2353     DataProfileDataInfo dataProfileInfo;
2354     dataProfileInfo.profileId = 0;
2355     dataProfileInfo.password = "";
2356     dataProfileInfo.authenticationType = 0;
2357     dataProfileInfo.userName = "";
2358     dataProfileInfo.apn = "cmnet";
2359     dataProfileInfo.protocol = "IPV4V6";
2360     dataProfileInfo.roamingProtocol = "IPV4V6";
2361     dataProfileInfo.serial = serialId;
2362     dataProfilesInfo.profiles.push_back(dataProfileInfo);
2363     int32_t ret = g_rilInterface->SetDataProfileInfo(SLOTID_1, serialId, dataProfilesInfo);
2364     WaitFor(WAIT_TIME_SECOND_LONG);
2365     EXPECT_EQ(SUCCESS, ret);
2366     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_SET_DATA_PROFILE_INFO));
2367 }
2368 
2369 /**
2370  * @tc.number   Telephony_DriverSystem_SetDataProfileInfo_V1_0200
2371  * @tc.name     Set data profile info
2372  * @tc.desc     Function test
2373  */
2374 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetDataProfileInfo_V1_0200, Function | MediumTest | Level3)
2375 {
2376     if (!IsReady(SLOTID_2)) {
2377         return;
2378     }
2379     int32_t serialId = GetSerialId();
2380     DataProfilesInfo dataProfilesInfo;
2381     dataProfilesInfo.serial = serialId;
2382     dataProfilesInfo.profilesSize = 1;
2383     DataProfileDataInfo dataProfileInfo;
2384     dataProfileInfo.profileId = 0;
2385     dataProfileInfo.password = "";
2386     dataProfileInfo.authenticationType = 0;
2387     dataProfileInfo.userName = "";
2388     dataProfileInfo.apn = "cmnet";
2389     dataProfileInfo.protocol = "IPV4V6";
2390     dataProfileInfo.roamingProtocol = "IPV4V6";
2391     dataProfileInfo.serial = serialId;
2392     dataProfilesInfo.profiles.push_back(dataProfileInfo);
2393     int32_t ret = g_rilInterface->SetDataProfileInfo(SLOTID_2, serialId, dataProfilesInfo);
2394     WaitFor(WAIT_TIME_SECOND_LONG);
2395     EXPECT_EQ(SUCCESS, ret);
2396     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_DATA_SET_DATA_PROFILE_INFO));
2397 }
2398 
2399 /**
2400  * @tc.number   Telephony_DriverSystem_GetSimIO_V1_0100
2401  * @tc.name     Get sim IO
2402  * @tc.desc     Function test
2403  */
2404 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetSimIO_V1_0100, Function | MediumTest | Level3)
2405 {
2406     if (!IsReady(SLOTID_1)) {
2407         return;
2408     }
2409     SimIoRequestInfo msg;
2410     msg.command = 0xc0;
2411     msg.fileId = 0x2FE2;
2412     msg.p1 = 0;
2413     msg.p2 = 0;
2414     msg.p3 = 15;
2415     msg.data = "";
2416     msg.path = "3F00";
2417     msg.pin2 = "";
2418     int32_t ret = g_rilInterface->GetSimIO(SLOTID_1, GetSerialId(), msg);
2419     WaitFor(WAIT_TIME_SECOND);
2420     EXPECT_EQ(SUCCESS, ret);
2421     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_GET_SIM_IO));
2422 }
2423 
2424 /**
2425  * @tc.number   Telephony_DriverSystem_GetSimIO_V1_0200
2426  * @tc.name     Get sim IO
2427  * @tc.desc     Function test
2428  */
2429 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetSimIO_V1_0200, Function | MediumTest | Level3)
2430 {
2431     if (!IsReady(SLOTID_2)) {
2432         return;
2433     }
2434     SimIoRequestInfo msg;
2435     msg.command = 0xC0;
2436     // ICCID
2437     msg.fileId = 0x2FE2;
2438     msg.p1 = 0;
2439     msg.p2 = 0;
2440     msg.p3 = 15;
2441     msg.data = "";
2442     msg.path = "3F00";
2443     msg.pin2 = "";
2444     int32_t ret = g_rilInterface->GetSimIO(SLOTID_2, GetSerialId(), msg);
2445     WaitFor(WAIT_TIME_SECOND);
2446     EXPECT_EQ(SUCCESS, ret);
2447     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_GET_SIM_IO));
2448 }
2449 
2450 /**
2451  * @tc.number   Telephony_DriverSystem_GetImsi_V1_0100
2452  * @tc.name     Get imsi
2453  * @tc.desc     Function test
2454  */
2455 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetImsi_V1_0100, Function | MediumTest | Level3)
2456 {
2457     if (!IsReady(SLOTID_1)) {
2458         return;
2459     }
2460     int32_t ret = g_rilInterface->GetImsi(SLOTID_1, GetSerialId());
2461     WaitFor(WAIT_TIME_SECOND);
2462     EXPECT_EQ(SUCCESS, ret);
2463     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_GET_IMSI));
2464 }
2465 
2466 /**
2467  * @tc.number   Telephony_DriverSystem_GetImsi_V1_0200
2468  * @tc.name     Get imsi
2469  * @tc.desc     Function test
2470  */
2471 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetImsi_V1_0200, Function | MediumTest | Level3)
2472 {
2473     if (!IsReady(SLOTID_2)) {
2474         return;
2475     }
2476     int32_t ret = g_rilInterface->GetImsi(SLOTID_2, GetSerialId());
2477     WaitFor(WAIT_TIME_SECOND);
2478     EXPECT_EQ(SUCCESS, ret);
2479     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_GET_IMSI));
2480 }
2481 
2482 /**
2483  * @tc.number   Telephony_DriverSystem_SetActiveSim_V1_0100
2484  * @tc.name     Set active sim
2485  * @tc.desc     Function test
2486  */
2487 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetActiveSim_V1_0100, Function | MediumTest | Level3)
2488 {
2489     if (!IsReady(SLOTID_1)) {
2490         return;
2491     }
2492     int32_t enable = 1;
2493     int32_t index = 1; // ENTITY_CARD
2494     int32_t ret = g_rilInterface->SetActiveSim(SLOTID_1, GetSerialId(), index, enable);
2495     WaitFor(WAIT_TIME_SECOND);
2496     EXPECT_EQ(SUCCESS, ret);
2497     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_SET_ACTIVE_SIM));
2498 }
2499 
2500 /**
2501  * @tc.number   Telephony_DriverSystem_SetActiveSim_V1_0200
2502  * @tc.name     Set active sim
2503  * @tc.desc     Function test
2504  */
2505 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetActiveSim_V1_0200, Function | MediumTest | Level3)
2506 {
2507     if (!IsReady(SLOTID_2)) {
2508         return;
2509     }
2510     int32_t enable = 1;
2511     int32_t index = 1; // ENTITY_CARD
2512     int32_t ret = g_rilInterface->SetActiveSim(SLOTID_2, GetSerialId(), index, enable);
2513     WaitFor(WAIT_TIME_SECOND);
2514     EXPECT_EQ(SUCCESS, ret);
2515     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_SET_ACTIVE_SIM));
2516 }
2517 
2518 /**
2519  * @tc.number   Telephony_DriverSystem_SimStkSendTerminalResponse_V1_0100
2520  * @tc.name     Sim stk send terminal response
2521  * @tc.desc     Function test
2522  */
2523 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimStkSendTerminalResponse_V1_0100, Function | MediumTest | Level3)
2524 {
2525     if (!IsReady(SLOTID_1)) {
2526         return;
2527     }
2528     std::string cmd = "send terminal response";
2529     int32_t ret = g_rilInterface->SimStkSendTerminalResponse(SLOTID_1, GetSerialId(), cmd);
2530     WaitFor(WAIT_TIME_SECOND);
2531     EXPECT_EQ(SUCCESS, ret);
2532     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_STK_SEND_TERMINAL_RESPONSE));
2533 }
2534 
2535 /**
2536  * @tc.number   Telephony_DriverSystem_SimStkSendTerminalResponse_V1_0200
2537  * @tc.name     Sim stk send terminal response
2538  * @tc.desc     Function test
2539  */
2540 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimStkSendTerminalResponse_V1_0200, Function | MediumTest | Level3)
2541 {
2542     if (!IsReady(SLOTID_2)) {
2543         return;
2544     }
2545     std::string cmd = "send terminal response";
2546     int32_t ret = g_rilInterface->SimStkSendTerminalResponse(SLOTID_2, GetSerialId(), cmd);
2547     WaitFor(WAIT_TIME_SECOND);
2548     EXPECT_EQ(SUCCESS, ret);
2549     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_STK_SEND_TERMINAL_RESPONSE));
2550 }
2551 
2552 /**
2553  * @tc.number   Telephony_DriverSystem_SimStkSendEnvelope_V1_0100
2554  * @tc.name     Sim stk send envelope
2555  * @tc.desc     Function test
2556  */
2557 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimStkSendEnvelope_V1_0100, Function | MediumTest | Level3)
2558 {
2559     if (!IsReady(SLOTID_1)) {
2560         return;
2561     }
2562     std::string cmd = "send envelope";
2563     int32_t ret = g_rilInterface->SimStkSendEnvelope(SLOTID_1, GetSerialId(), cmd);
2564     WaitFor(WAIT_TIME_SECOND);
2565     EXPECT_EQ(SUCCESS, ret);
2566     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_STK_SEND_ENVELOPE));
2567 }
2568 
2569 /**
2570  * @tc.number   Telephony_DriverSystem_SimStkSendEnvelope_V1_0200
2571  * @tc.name     Sim stk send envelope
2572  * @tc.desc     Function test
2573  */
2574 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimStkSendEnvelope_V1_0200, Function | MediumTest | Level3)
2575 {
2576     if (!IsReady(SLOTID_2)) {
2577         return;
2578     }
2579     std::string cmd = "send envelope";
2580     int32_t ret = g_rilInterface->SimStkSendEnvelope(SLOTID_2, GetSerialId(), cmd);
2581     WaitFor(WAIT_TIME_SECOND);
2582     EXPECT_EQ(SUCCESS, ret);
2583     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_STK_SEND_ENVELOPE));
2584 }
2585 
2586 /**
2587  * @tc.number   Telephony_DriverSystem_SimStkSendCallSetupRequestResult_V1_0100
2588  * @tc.name     Sim stk send call setup requestResult
2589  * @tc.desc     Function test
2590  */
2591 HWTEST_F(
2592     RilInterfaceTest, Telephony_DriverSystem_SimStkSendCallSetupRequestResult_V1_0100, Function | MediumTest | Level3)
2593 {
2594     if (!IsReady(SLOTID_1)) {
2595         return;
2596     }
2597     int32_t ret = g_rilInterface->SimStkSendCallSetupRequestResult(SLOTID_1, GetSerialId(), true);
2598     WaitFor(WAIT_TIME_SECOND);
2599     EXPECT_EQ(SUCCESS, ret);
2600     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_STK_SEND_CALL_SETUP_REQUEST_RESULT));
2601 }
2602 
2603 /**
2604  * @tc.number   Telephony_DriverSystem_SimStkSendCallSetupRequestResult_V1_0200
2605  * @tc.name     Sim stk send call setup requestResult
2606  * @tc.desc     Function test
2607  */
2608 HWTEST_F(
2609     RilInterfaceTest, Telephony_DriverSystem_SimStkSendCallSetupRequestResult_V1_0200, Function | MediumTest | Level3)
2610 {
2611     if (!IsReady(SLOTID_2)) {
2612         return;
2613     }
2614     int32_t ret = g_rilInterface->SimStkSendCallSetupRequestResult(SLOTID_2, GetSerialId(), true);
2615     WaitFor(WAIT_TIME_SECOND);
2616     EXPECT_EQ(SUCCESS, ret);
2617     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_STK_SEND_CALL_SETUP_REQUEST_RESULT));
2618 }
2619 
2620 /**
2621  * @tc.number   Telephony_DriverSystem_SimStkIsReady_V1_0100
2622  * @tc.name     Sim stk is ready
2623  * @tc.desc     Function test
2624  */
2625 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimStkIsReady_V1_0100, Function | MediumTest | Level3)
2626 {
2627     if (!IsReady(SLOTID_1)) {
2628         return;
2629     }
2630     int32_t ret = g_rilInterface->SimStkIsReady(SLOTID_1, GetSerialId());
2631     WaitFor(WAIT_TIME_SECOND);
2632     EXPECT_EQ(SUCCESS, ret);
2633     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_STK_IS_READY));
2634 }
2635 
2636 /**
2637  * @tc.number   Telephony_DriverSystem_SimStkIsReady_V1_0200
2638  * @tc.name     Sim stk is ready
2639  * @tc.desc     Function test
2640  */
2641 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimStkIsReady_V1_0200, Function | MediumTest | Level3)
2642 {
2643     if (!IsReady(SLOTID_2)) {
2644         return;
2645     }
2646     int32_t ret = g_rilInterface->SimStkIsReady(SLOTID_2, GetSerialId());
2647     WaitFor(WAIT_TIME_SECOND);
2648     EXPECT_EQ(SUCCESS, ret);
2649     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_STK_IS_READY));
2650 }
2651 
2652 /**
2653  * @tc.number   Telephony_DriverSystem_SetRadioProtocol_V1_0100
2654  * @tc.name     Set radio protocol
2655  * @tc.desc     Function test
2656  */
2657 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetRadioProtocol_V1_0100, Function | MediumTest | Level3)
2658 {
2659     if (!IsReady(SLOTID_1)) {
2660         return;
2661     }
2662     RadioProtocol protocol;
2663     protocol.slotId = SLOTID_1;
2664     int32_t ret = g_rilInterface->SetRadioProtocol(SLOTID_1, GetSerialId(), protocol);
2665     WaitFor(WAIT_TIME_SECOND);
2666     EXPECT_EQ(SUCCESS, ret);
2667     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_RADIO_PROTOCOL));
2668 }
2669 
2670 /**
2671  * @tc.number   Telephony_DriverSystem_SetRadioProtocol_V1_0200
2672  * @tc.name     Set radio protocol
2673  * @tc.desc     Function test
2674  */
2675 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetRadioProtocol_V1_0200, Function | MediumTest | Level3)
2676 {
2677     if (!IsReady(SLOTID_2)) {
2678         return;
2679     }
2680     RadioProtocol protocol;
2681     protocol.slotId = SLOTID_2;
2682     int32_t ret = g_rilInterface->SetRadioProtocol(SLOTID_2, GetSerialId(), protocol);
2683     WaitFor(WAIT_TIME_SECOND);
2684     EXPECT_EQ(SUCCESS, ret);
2685     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_RADIO_PROTOCOL));
2686 }
2687 
2688 /**
2689  * @tc.number   Telephony_DriverSystem_SimOpenLogicalChannel_V1_0100
2690  * @tc.name     Sim open logical channel
2691  * @tc.desc     Function test
2692  */
2693 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimOpenLogicalChannel_V1_0100, Function | MediumTest | Level3)
2694 {
2695     if (!IsReady(SLOTID_1)) {
2696         return;
2697     }
2698     std::string appID = "A00000015141434C00"; // ARAM_AID
2699     int32_t p2 = 0;
2700     int32_t ret = g_rilInterface->SimOpenLogicalChannel(SLOTID_1, GetSerialId(), appID, p2);
2701     WaitFor(WAIT_TIME_SECOND);
2702     EXPECT_EQ(SUCCESS, ret);
2703     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_OPEN_LOGICAL_CHANNEL));
2704 }
2705 
2706 /**
2707  * @tc.number   Telephony_DriverSystem_SimTransmitApduLogicalChannel_V1_0100
2708  * @tc.name     Sim transmit apdu logical channel
2709  * @tc.desc     Function test
2710  */
2711 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimTransmitApduLogicalChannel_V1_0100, Function | MediumTest | Level3)
2712 {
2713     if (!IsReady(SLOTID_1)) {
2714         return;
2715     }
2716     ApduSimIORequestInfo reqInfo;
2717     reqInfo.channelId = g_callback.GetCurrentChannelId();
2718     reqInfo.type = 0x80; // CLA
2719     reqInfo.instruction = 0xCA; // COMMAND;
2720     reqInfo.p1 = 0xFF;
2721     reqInfo.p2 = 0x40;
2722     reqInfo.p3 = 0x00;
2723     reqInfo.data = "";
2724     int32_t ret = g_rilInterface->SimTransmitApduLogicalChannel(SLOTID_1, GetSerialId(), reqInfo);
2725     WaitFor(WAIT_TIME_SECOND);
2726     EXPECT_EQ(SUCCESS, ret);
2727     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_TRANSMIT_APDU_LOGICAL_CHANNEL));
2728 }
2729 
2730 /**
2731  * @tc.number   Telephony_DriverSystem_SimCloseLogicalChannel_V1_0100
2732  * @tc.name     Sim close logical channel
2733  * @tc.desc     Function test
2734  */
2735 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimCloseLogicalChannel_V1_0100, Function | MediumTest | Level3)
2736 {
2737     if (!IsReady(SLOTID_1)) {
2738         return;
2739     }
2740     int32_t ret = g_rilInterface->SimCloseLogicalChannel(SLOTID_1, GetSerialId(), g_callback.GetCurrentChannelId());
2741     WaitFor(WAIT_TIME_SECOND);
2742     EXPECT_EQ(SUCCESS, ret);
2743     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_CLOSE_LOGICAL_CHANNEL));
2744 }
2745 
2746 /**
2747  * @tc.number   Telephony_DriverSystem_SimCloseLogicalChannel_V1_0100
2748  * @tc.name     Sim open logical channel
2749  * @tc.desc     Function test
2750  */
2751 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimOpenLogicalChannel_V1_0200, Function | MediumTest | Level3)
2752 {
2753     if (!IsReady(SLOTID_2)) {
2754         return;
2755     }
2756     std::string appID = "A00000015141434C00"; // ARAM_AID
2757     int32_t p2 = 0;
2758     int32_t ret = g_rilInterface->SimOpenLogicalChannel(SLOTID_2, GetSerialId(), appID, p2);
2759     WaitFor(WAIT_TIME_SECOND);
2760     EXPECT_EQ(SUCCESS, ret);
2761     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_OPEN_LOGICAL_CHANNEL));
2762 }
2763 
2764 /**
2765  * @tc.number   Telephony_DriverSystem_SimTransmitApduLogicalChannel_V1_0200
2766  * @tc.name     Sim transmit apdu logical channel
2767  * @tc.desc     Function test
2768  */
2769 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimTransmitApduLogicalChannel_V1_0200, Function | MediumTest | Level3)
2770 {
2771     if (!IsReady(SLOTID_2)) {
2772         return;
2773     }
2774     ApduSimIORequestInfo reqInfo;
2775     reqInfo.channelId = g_callback.GetCurrentChannelId();
2776     reqInfo.type = 0x80; // CLA
2777     reqInfo.instruction = 0xCA; // COMMAND;
2778     reqInfo.p1 = 0xFF;
2779     reqInfo.p2 = 0x40;
2780     reqInfo.p3 = 0x00;
2781     reqInfo.data = "";
2782     int32_t ret = g_rilInterface->SimTransmitApduLogicalChannel(SLOTID_2, GetSerialId(), reqInfo);
2783     WaitFor(WAIT_TIME_SECOND);
2784     EXPECT_EQ(SUCCESS, ret);
2785     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_TRANSMIT_APDU_LOGICAL_CHANNEL));
2786 }
2787 
2788 /**
2789  * @tc.number   Telephony_DriverSystem_SimCloseLogicalChannel_V1_0100
2790  * @tc.name     Sim close logical channel
2791  * @tc.desc     Function test
2792  */
2793 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimCloseLogicalChannel_V1_0200, Function | MediumTest | Level3)
2794 {
2795     if (!IsReady(SLOTID_2)) {
2796         return;
2797     }
2798     int32_t ret = g_rilInterface->SimCloseLogicalChannel(SLOTID_2, GetSerialId(), g_callback.GetCurrentChannelId());
2799     WaitFor(WAIT_TIME_SECOND);
2800     EXPECT_EQ(SUCCESS, ret);
2801     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_CLOSE_LOGICAL_CHANNEL));
2802 }
2803 
2804 /**
2805  * @tc.number   Telephony_DriverSystem_SimTransmitApduBasicChannel_V1_0100
2806  * @tc.name     Sim transmit apdu basic channel
2807  * @tc.desc     Function test
2808  */
2809 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimTransmitApduBasicChannel_V1_0100, Function | MediumTest | Level3)
2810 {
2811     if (!IsReady(SLOTID_1)) {
2812         return;
2813     }
2814     ApduSimIORequestInfo reqInfo;
2815     reqInfo.type = 0x80; // CLA
2816     reqInfo.instruction = 0xCA; // COMMAND;
2817     reqInfo.p1 = 0xFF;
2818     reqInfo.p2 = 0x40;
2819     reqInfo.p3 = 0x00;
2820     reqInfo.data = "";
2821     int32_t ret = g_rilInterface->SimTransmitApduBasicChannel(SLOTID_1, GetSerialId(), reqInfo);
2822     WaitFor(WAIT_TIME_SECOND);
2823     EXPECT_EQ(SUCCESS, ret);
2824     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_TRANSMIT_APDU_BASIC_CHANNEL));
2825 }
2826 
2827 /**
2828  * @tc.number   Telephony_DriverSystem_SimTransmitApduBasicChannel_V1_0200
2829  * @tc.name     Sim transmit apdu basic channel
2830  * @tc.desc     Function test
2831  */
2832 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimTransmitApduBasicChannel_V1_0200, Function | MediumTest | Level3)
2833 {
2834     if (!IsReady(SLOTID_2)) {
2835         return;
2836     }
2837     ApduSimIORequestInfo reqInfo;
2838     reqInfo.type = 0x80; // CLA
2839     reqInfo.instruction = 0xCA; // COMMAND;
2840     reqInfo.p1 = 0xFF;
2841     reqInfo.p2 = 0x40;
2842     reqInfo.p3 = 0x00;
2843     reqInfo.data = "";
2844     int32_t ret = g_rilInterface->SimTransmitApduBasicChannel(SLOTID_2, GetSerialId(), reqInfo);
2845     WaitFor(WAIT_TIME_SECOND);
2846     EXPECT_EQ(SUCCESS, ret);
2847     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_TRANSMIT_APDU_BASIC_CHANNEL));
2848 }
2849 
2850 /**
2851  * @tc.number   Telephony_DriverSystem_SimAuthentication_V1_0100
2852  * @tc.name     Sim authentication
2853  * @tc.desc     Function test
2854  */
2855 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimAuthentication_V1_0100, Function | MediumTest | Level3)
2856 {
2857     if (!IsReady(SLOTID_1)) {
2858         return;
2859     }
2860     SimAuthenticationRequestInfo simAuthInfo;
2861     simAuthInfo.aid = "aid";
2862     simAuthInfo.authData = "authData";
2863     int32_t ret = g_rilInterface->SimAuthentication(SLOTID_1, GetSerialId(), simAuthInfo);
2864     WaitFor(WAIT_TIME_SECOND);
2865     EXPECT_EQ(SUCCESS, ret);
2866     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_AUTHENTICATION));
2867 }
2868 
2869 /**
2870  * @tc.number   Telephony_DriverSystem_SimAuthentication_V1_0200
2871  * @tc.name     Sim authentication
2872  * @tc.desc     Function test
2873  */
2874 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SimAuthentication_V1_0200, Function | MediumTest | Level3)
2875 {
2876     if (!IsReady(SLOTID_2)) {
2877         return;
2878     }
2879     SimAuthenticationRequestInfo simAuthInfo;
2880     simAuthInfo.aid = "aid";
2881     simAuthInfo.authData = "authData";
2882     int32_t ret = g_rilInterface->SimAuthentication(SLOTID_2, GetSerialId(), simAuthInfo);
2883     WaitFor(WAIT_TIME_SECOND);
2884     EXPECT_EQ(SUCCESS, ret);
2885     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_AUTHENTICATION));
2886 }
2887 
2888 /**
2889  * @tc.number   Telephony_DriverSystem_GetSimLockStatus_V1_0100
2890  * @tc.name     Get Sim lock status
2891  * @tc.desc     Function test
2892  */
2893 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetSimLockStatus_V1_0100, Function | MediumTest | Level3)
2894 {
2895 #ifdef TEL_TEST_PIN_PUK
2896     if (!IsReady(SLOTID_1)) {
2897         return;
2898     }
2899     SimLockInfo simLockInfo;
2900     simLockInfo.fac = "SC"; // FAC_PIN_LOCK
2901     simLockInfo.mode = 2; // MODE
2902     simLockInfo.classx = 0;
2903     char *FAC_PIN_LOCK = "SC";
2904     int32_t ret = g_rilInterface->GetSimLockStatus(SLOTID_1, GetSerialId(), simLockInfo);
2905     WaitFor(WAIT_TIME_SECOND);
2906     EXPECT_EQ(SUCCESS, ret);
2907     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_GET_SIM_LOCK_STATUS));
2908 #endif
2909     ASSERT_TRUE(true);
2910 }
2911 
2912 /**
2913  * @tc.number   Telephony_DriverSystem_GetSimLockStatus_V1_0200
2914  * @tc.name     Get Sim lock status
2915  * @tc.desc     Function test
2916  */
2917 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetSimLockStatus_V1_0200, Function | MediumTest | Level3)
2918 {
2919 #ifdef TEL_TEST_PIN_PUK
2920     if (!IsReady(SLOTID_2)) {
2921         return;
2922     }
2923     SimLockInfo simLockInfo;
2924     simLockInfo.fac = "SC"; // FAC_PIN_LOCK
2925     simLockInfo.mode = 2; // MODE
2926     simLockInfo.classx = 0;
2927     char *FAC_PIN_LOCK = "SC";
2928     int32_t ret = g_rilInterface->GetSimLockStatus(SLOTID_2, GetSerialId(), simLockInfo);
2929     WaitFor(WAIT_TIME_SECOND);
2930     EXPECT_EQ(SUCCESS, ret);
2931     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_GET_SIM_LOCK_STATUS));
2932 #endif
2933     ASSERT_TRUE(true);
2934 }
2935 
2936 /**
2937  * @tc.number   Telephony_DriverSystem_SetSimLock_V1_0100
2938  * @tc.name     Set Sim lock
2939  * @tc.desc     Function test
2940  */
2941 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetSimLock_V1_0100, Function | MediumTest | Level3)
2942 {
2943 #ifdef TEL_TEST_PIN_PUK
2944     if (!IsReady(SLOTID_1)) {
2945         return;
2946     }
2947     SimLockInfo simLockInfo;
2948     simLockInfo.fac = "SC"; // FAC_PIN_LOCK
2949     simLockInfo.mode = 2; // MODE
2950     simLockInfo.classx = 0;
2951     simLockInfo.passwd = "1234";
2952     char *FAC_PIN_LOCK = "SC";
2953     int32_t ret = g_rilInterface->SetSimLock(SLOTID_1, GetSerialId(), simLockInfo);
2954     WaitFor(WAIT_TIME_SECOND);
2955     EXPECT_EQ(SUCCESS, ret);
2956     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_SET_SIM_LOCK));
2957 #endif
2958     ASSERT_TRUE(true);
2959 }
2960 
2961 /**
2962  * @tc.number   Telephony_DriverSystem_SetSimLock_V1_0200
2963  * @tc.name     Set Sim lock
2964  * @tc.desc     Function test
2965  */
2966 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetSimLock_V1_0200, Function | MediumTest | Level3)
2967 {
2968 #ifdef TEL_TEST_PIN_PUK
2969     if (!IsReady(SLOTID_2)) {
2970         return;
2971     }
2972     SimLockInfo simLockInfo;
2973     simLockInfo.fac = "SC"; // FAC_PIN_LOCK
2974     simLockInfo.mode = 2; // MODE
2975     simLockInfo.classx = 0;
2976     simLockInfo.passwd = "1234";
2977     char *FAC_PIN_LOCK = "SC";
2978     int32_t ret = g_rilInterface->SetSimLock(SLOTID_2, GetSerialId(), simLockInfo);
2979     WaitFor(WAIT_TIME_SECOND);
2980     EXPECT_EQ(SUCCESS, ret);
2981     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_SET_SIM_LOCK));
2982 #endif
2983     ASSERT_TRUE(true);
2984 }
2985 
2986 /**
2987  * @tc.number   Telephony_DriverSystem_ChangeSimPassword_V1_0100
2988  * @tc.name     Change sim password
2989  * @tc.desc     Function test
2990  */
2991 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_ChangeSimPassword_V1_0100, Function | MediumTest | Level3)
2992 {
2993 #ifdef TEL_TEST_PIN_PUK
2994     if (!IsReady(SLOTID_1)) {
2995         return;
2996     }
2997     ISimPasswordInfo simPassword;
2998     simPassword.fac = "SC"; // FAC_PIN_LOCK
2999     simPassword.oldPassword = "1234";
3000     simPassword.newPassword = "1234";
3001     simPassword.passwordLength = 4;
3002     int32_t ret = g_rilInterface->ChangeSimPassword(SLOTID_1, GetSerialId(), simPassword);
3003     WaitFor(WAIT_TIME_SECOND);
3004     EXPECT_EQ(SUCCESS, ret);
3005     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_CHANGE_SIM_PASSWORD));
3006 #endif
3007     ASSERT_TRUE(true);
3008 }
3009 
3010 /**
3011  * @tc.number   Telephony_DriverSystem_ChangeSimPassword_V1_0200
3012  * @tc.name     Change sim password
3013  * @tc.desc     Function test
3014  */
3015 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_ChangeSimPassword_V1_0200, Function | MediumTest | Level3)
3016 {
3017 #ifdef TEL_TEST_PIN_PUK
3018     if (!IsReady(SLOTID_2)) {
3019         return;
3020     }
3021     ISimPasswordInfo simPassword;
3022     simPassword.fac = "SC"; // FAC_PIN_LOCK
3023     simPassword.oldPassword = "1234";
3024     simPassword.newPassword = "1234";
3025     simPassword.passwordLength = 4;
3026     int32_t ret = g_rilInterface->ChangeSimPassword(SLOTID_2, GetSerialId(), simPassword);
3027     WaitFor(WAIT_TIME_SECOND);
3028     EXPECT_EQ(SUCCESS, ret);
3029     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_CHANGE_SIM_PASSWORD));
3030 #endif
3031     ASSERT_TRUE(true);
3032 }
3033 
3034 /**
3035  * @tc.number   Telephony_DriverSystem_UnlockPin_V1_0100
3036  * @tc.name     Unlock pin
3037  * @tc.desc     Function test
3038  */
3039 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UnlockPin_V1_0100, Function | MediumTest | Level3)
3040 {
3041 #ifdef TEL_TEST_PIN_PUK
3042     if (!IsReady(SLOTID_1)) {
3043         return;
3044     }
3045     std::string pin = "1234";
3046     int32_t ret = g_rilInterface->UnlockPin(SLOTID_1, GetSerialId(), pin);
3047     WaitFor(WAIT_TIME_SECOND);
3048     EXPECT_EQ(SUCCESS, ret);
3049     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_UNLOCK_PIN));
3050 #endif
3051     ASSERT_TRUE(true);
3052 }
3053 
3054 /**
3055  * @tc.number   Telephony_DriverSystem_UnlockPin_V1_0200
3056  * @tc.name     Unlock pin
3057  * @tc.desc     Function test
3058  */
3059 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UnlockPin_V1_0200, Function | MediumTest | Level3)
3060 {
3061 #ifdef TEL_TEST_PIN_PUK
3062     if (!IsReady(SLOTID_2)) {
3063         return;
3064     }
3065     std::string pin = "1234";
3066     int32_t ret = g_rilInterface->UnlockPin(SLOTID_2, GetSerialId(), pin);
3067     WaitFor(WAIT_TIME_SECOND);
3068     EXPECT_EQ(SUCCESS, ret);
3069     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_UNLOCK_PIN));
3070 #endif
3071     ASSERT_TRUE(true);
3072 }
3073 
3074 /**
3075  * @tc.number   Telephony_DriverSystem_UnlockPuk_V1_0100
3076  * @tc.name     Unlock puk
3077  * @tc.desc     Function test
3078  */
3079 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UnlockPuk_V1_0100, Function | MediumTest | Level3)
3080 {
3081 #ifdef TEL_TEST_PIN_PUK
3082     if (!IsReady(SLOTID_1)) {
3083         return;
3084     }
3085     std::string puk = "42014264";
3086     std::string pin = "1234";
3087     int32_t ret = g_rilInterface->UnlockPuk(SLOTID_1, GetSerialId(), puk, pin);
3088     WaitFor(WAIT_TIME_SECOND);
3089     EXPECT_EQ(SUCCESS, ret);
3090     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_UNLOCK_PUK));
3091 #endif
3092     ASSERT_TRUE(true);
3093 }
3094 
3095 /**
3096  * @tc.number   Telephony_DriverSystem_UnlockPuk_V1_0200
3097  * @tc.name     Unlock puk
3098  * @tc.desc     Function test
3099  */
3100 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UnlockPuk_V1_0200, Function | MediumTest | Level3)
3101 {
3102 #ifdef TEL_TEST_PIN_PUK
3103     if (!IsReady(SLOTID_2)) {
3104         return;
3105     }
3106     std::string puk = "42014264";
3107     std::string pin = "1234";
3108     int32_t ret = g_rilInterface->UnlockPuk(SLOTID_2, GetSerialId(), puk, pin);
3109     WaitFor(WAIT_TIME_SECOND);
3110     EXPECT_EQ(SUCCESS, ret);
3111     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_UNLOCK_PUK));
3112 #endif
3113     ASSERT_TRUE(true);
3114 }
3115 
3116 /**
3117  * @tc.number   Telephony_DriverSystem_UnlockPin2_V1_0100
3118  * @tc.name     Unlock pin2
3119  * @tc.desc     Function test
3120  */
3121 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UnlockPin2_V1_0100, Function | MediumTest | Level3)
3122 {
3123 #ifdef TEL_TEST_PIN_PUK
3124     if (!IsReady(SLOTID_1)) {
3125         return;
3126     }
3127     std::string pin2 = "1234";
3128     int32_t ret = g_rilInterface->UnlockPin2(SLOTID_1, GetSerialId(), pin2);
3129     WaitFor(WAIT_TIME_SECOND);
3130     EXPECT_EQ(SUCCESS, ret);
3131     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_UNLOCK_PIN2));
3132 #endif
3133     ASSERT_TRUE(true);
3134 }
3135 
3136 /**
3137  * @tc.number   Telephony_DriverSystem_UnlockPin2_V1_0200
3138  * @tc.name     Unlock pin2
3139  * @tc.desc     Function test
3140  */
3141 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UnlockPin2_V1_0200, Function | MediumTest | Level3)
3142 {
3143 #ifdef TEL_TEST_PIN_PUK
3144     if (!IsReady(SLOTID_2)) {
3145         return;
3146     }
3147     std::string pin2 = "1234";
3148     int32_t ret = g_rilInterface->UnlockPin2(SLOTID_2, GetSerialId(), pin2);
3149     WaitFor(WAIT_TIME_SECOND);
3150     EXPECT_EQ(SUCCESS, ret);
3151     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_UNLOCK_PIN2));
3152 #endif
3153     ASSERT_TRUE(true);
3154 }
3155 
3156 /**
3157  * @tc.number   Telephony_DriverSystem_UnlockPuk2_V1_0100
3158  * @tc.name     Unlock puk2
3159  * @tc.desc     Function test
3160  */
3161 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UnlockPuk2_V1_0100, Function | MediumTest | Level3)
3162 {
3163 #ifdef TEL_TEST_PIN_PUK
3164     if (!IsReady(SLOTID_1)) {
3165         return;
3166     }
3167     std::string puk2 = "42014264";
3168     std::string pin2 = "1234";
3169     int32_t ret = g_rilInterface->UnlockPuk2(SLOTID_1, GetSerialId(), puk2, pin2);
3170     WaitFor(WAIT_TIME_SECOND);
3171     EXPECT_EQ(SUCCESS, ret);
3172     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_UNLOCK_PUK2));
3173 #endif
3174     ASSERT_TRUE(true);
3175 }
3176 
3177 /**
3178  * @tc.number   Telephony_DriverSystem_UnlockPuk2_V1_0200
3179  * @tc.name     Unlock puk2
3180  * @tc.desc     Function test
3181  */
3182 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UnlockPuk2_V1_0200, Function | MediumTest | Level3)
3183 {
3184 #ifdef TEL_TEST_PIN_PUK
3185     if (!IsReady(SLOTID_2)) {
3186         return;
3187     }
3188     std::string puk2 = "42014264";
3189     std::string pin2 = "1234";
3190     int32_t ret = g_rilInterface->UnlockPuk2(SLOTID_2, GetSerialId(), puk2, pin2);
3191     WaitFor(WAIT_TIME_SECOND);
3192     EXPECT_EQ(SUCCESS, ret);
3193     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_UNLOCK_PUK2));
3194 #endif
3195     ASSERT_TRUE(true);
3196 }
3197 
3198 /**
3199  * @tc.number   Telephony_DriverSystem_UnlockSimLock_V1_0100
3200  * @tc.name     Unlock sim lock
3201  * @tc.desc     Function test
3202  */
3203 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UnlockSimLock_V1_0100, Function | MediumTest | Level3)
3204 {
3205 #ifdef TEL_TEST_PIN_PUK
3206     if (!IsReady(SLOTID_1)) {
3207         return;
3208     }
3209     int32_t lockType = 0;
3210     std::string key = "1234"; // PN_PIN_LOCK
3211     int32_t ret = g_rilInterface->UnlockSimLock(SLOTID_1, GetSerialId(), lockType, key);
3212     WaitFor(WAIT_TIME_SECOND);
3213     EXPECT_EQ(SUCCESS, ret);
3214     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_UNLOCK_SIM_LOCK));
3215 #endif
3216     ASSERT_TRUE(true);
3217 }
3218 
3219 /**
3220  * @tc.number   Telephony_DriverSystem_UnlockSimLock_V1_0200
3221  * @tc.name     Unlock sim lock
3222  * @tc.desc     Function test
3223  */
3224 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UnlockSimLock_V1_0200, Function | MediumTest | Level3)
3225 {
3226 #ifdef TEL_TEST_PIN_PUK
3227     if (!IsReady(SLOTID_2)) {
3228         return;
3229     }
3230     int32_t lockType = 0;
3231     std::string key = "1234"; // PN_PIN_LOCK
3232     int32_t ret = g_rilInterface->UnlockSimLock(SLOTID_2, GetSerialId(), lockType, key);
3233     WaitFor(WAIT_TIME_SECOND);
3234     EXPECT_EQ(SUCCESS, ret);
3235     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SIM_UNLOCK_SIM_LOCK));
3236 #endif
3237     ASSERT_TRUE(true);
3238 }
3239 
3240 /**
3241  * @tc.number   Telephony_DriverSystem_AddSimMessage_V1_0100
3242  * @tc.name     Add sim message
3243  * @tc.desc     Function test
3244  */
3245 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_AddSimMessage_V1_0100, Function | MediumTest | Level3)
3246 {
3247     if (!IsReady(SLOTID_1)) {
3248         return;
3249     }
3250     SmsMessageIOInfo msgIoInfo;
3251     msgIoInfo.smscPdu = TEST_SMSC_PDU;
3252     msgIoInfo.pdu = TEST_STORAGE_PDU;
3253     msgIoInfo.state = static_cast<int32_t>(SimMessageStatus::SIM_MESSAGE_STATUS_SENT);
3254     int32_t ret = g_rilInterface->AddSimMessage(SLOTID_1, GetSerialId(), msgIoInfo);
3255     WaitFor(WAIT_TIME_SECOND_LONG);
3256     EXPECT_EQ(SUCCESS, ret);
3257     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_ADD_SIM_MESSAGE));
3258 }
3259 
3260 /**
3261  * @tc.number   Telephony_DriverSystem_AddSimMessage_V1_0200
3262  * @tc.name     Add sim message
3263  * @tc.desc     Function test
3264  */
3265 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_AddSimMessage_V1_0200, Function | MediumTest | Level3)
3266 {
3267     if (!IsReady(SLOTID_2)) {
3268         return;
3269     }
3270     SmsMessageIOInfo msgIoInfo;
3271     msgIoInfo.smscPdu = TEST_SMSC_PDU;
3272     msgIoInfo.pdu = TEST_STORAGE_PDU;
3273     msgIoInfo.state = static_cast<int32_t>(SimMessageStatus::SIM_MESSAGE_STATUS_SENT);
3274     int32_t ret = g_rilInterface->AddSimMessage(SLOTID_2, GetSerialId(), msgIoInfo);
3275     WaitFor(WAIT_TIME_SECOND_LONG);
3276     EXPECT_EQ(SUCCESS, ret);
3277     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_ADD_SIM_MESSAGE));
3278 }
3279 
3280 /**
3281  * @tc.number   Telephony_DriverSystem_UpdateSimMessage_V1_0100
3282  * @tc.name     Update sim message
3283  * @tc.desc     Function test
3284  */
3285 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UpdateSimMessage_V1_0100, Function | MediumTest | Level3)
3286 {
3287     if (!IsReady(SLOTID_1)) {
3288         return;
3289     }
3290     SmsMessageIOInfo msgIoInfo;
3291     msgIoInfo.smscPdu = TEST_SMSC_PDU;
3292     msgIoInfo.pdu = TEST_STORAGE_PDU;
3293     msgIoInfo.state = static_cast<int32_t>(SimMessageStatus::SIM_MESSAGE_STATUS_SENT);
3294     msgIoInfo.index = 0;
3295     int32_t ret = g_rilInterface->UpdateSimMessage(SLOTID_1, GetSerialId(), msgIoInfo);
3296     WaitFor(WAIT_TIME_SECOND_LONG);
3297     EXPECT_EQ(SUCCESS, ret);
3298     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_UPDATE_SIM_MESSAGE));
3299 }
3300 
3301 /**
3302  * @tc.number   Telephony_DriverSystem_UpdateSimMessage_V1_0200
3303  * @tc.name     Update sim message
3304  * @tc.desc     Function test
3305  */
3306 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UpdateSimMessage_V1_0200, Function | MediumTest | Level3)
3307 {
3308     if (!IsReady(SLOTID_2)) {
3309         return;
3310     }
3311     SmsMessageIOInfo msgIoInfo;
3312     msgIoInfo.smscPdu = TEST_SMSC_PDU;
3313     msgIoInfo.pdu = TEST_STORAGE_PDU;
3314     msgIoInfo.state = static_cast<int32_t>(SimMessageStatus::SIM_MESSAGE_STATUS_SENT);
3315     msgIoInfo.index = 0;
3316     int32_t ret = g_rilInterface->UpdateSimMessage(SLOTID_2, GetSerialId(), msgIoInfo);
3317     WaitFor(WAIT_TIME_SECOND_LONG);
3318     EXPECT_EQ(SUCCESS, ret);
3319     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_UPDATE_SIM_MESSAGE));
3320 }
3321 
3322 /**
3323  * @tc.number   Telephony_DriverSystem_DelSimMessage_V1_0100
3324  * @tc.name     Delete sim message
3325  * @tc.desc     Function test
3326  */
3327 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_DelSimMessage_V1_0100, Function | MediumTest | Level3)
3328 {
3329     if (!IsReady(SLOTID_1)) {
3330         return;
3331     }
3332     int32_t index = 0;
3333     int32_t ret = g_rilInterface->DelSimMessage(SLOTID_1, GetSerialId(), index);
3334     WaitFor(WAIT_TIME_SECOND_LONG);
3335     EXPECT_EQ(SUCCESS, ret);
3336     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_DEL_SIM_MESSAGE));
3337 }
3338 
3339 /**
3340  * @tc.number   Telephony_DriverSystem_DelSimMessage_V1_0200
3341  * @tc.name     Delete sim message
3342  * @tc.desc     Function test
3343  */
3344 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_DelSimMessage_V1_0200, Function | MediumTest | Level3)
3345 {
3346     if (!IsReady(SLOTID_2)) {
3347         return;
3348     }
3349     int32_t index = 0;
3350     int32_t ret = g_rilInterface->DelSimMessage(SLOTID_2, GetSerialId(), index);
3351     WaitFor(WAIT_TIME_SECOND_LONG);
3352     EXPECT_EQ(SUCCESS, ret);
3353     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_DEL_SIM_MESSAGE));
3354 }
3355 
3356 /**
3357  * @tc.number   Telephony_DriverSystem_AddCdmaSimMessage_V1_0100
3358  * @tc.name     Add cdma sim message
3359  * @tc.desc     Function test
3360  */
3361 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_AddCdmaSimMessage_V1_0100, Function | MediumTest | Level3)
3362 {
3363     if (!IsReady(SLOTID_1)) {
3364         return;
3365     }
3366     SmsMessageIOInfo msgIoInfo;
3367     msgIoInfo.smscPdu = TEST_SMSC_PDU;
3368     msgIoInfo.pdu = TEST_STORAGE_PDU;
3369     msgIoInfo.state = static_cast<int32_t>(SimMessageStatus::SIM_MESSAGE_STATUS_SENT);
3370     int32_t ret = g_rilInterface->AddCdmaSimMessage(SLOTID_1, GetSerialId(), msgIoInfo);
3371     WaitFor(WAIT_TIME_SECOND_LONG);
3372     EXPECT_EQ(SUCCESS, ret);
3373     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_ADD_CDMA_SIM_MESSAGE));
3374 }
3375 
3376 /**
3377  * @tc.number   Telephony_DriverSystem_AddCdmaSimMessage_V1_0200
3378  * @tc.name     Add cdma sim message
3379  * @tc.desc     Function test
3380  */
3381 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_AddCdmaSimMessage_V1_0200, Function | MediumTest | Level3)
3382 {
3383     if (!IsReady(SLOTID_2)) {
3384         return;
3385     }
3386     SmsMessageIOInfo msgIoInfo;
3387     msgIoInfo.smscPdu = TEST_SMSC_PDU;
3388     msgIoInfo.pdu = TEST_STORAGE_PDU;
3389     msgIoInfo.state = static_cast<int32_t>(SimMessageStatus::SIM_MESSAGE_STATUS_SENT);
3390     int32_t ret = g_rilInterface->AddCdmaSimMessage(SLOTID_2, GetSerialId(), msgIoInfo);
3391     WaitFor(WAIT_TIME_SECOND_LONG);
3392     EXPECT_EQ(SUCCESS, ret);
3393     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_ADD_CDMA_SIM_MESSAGE));
3394 }
3395 
3396 /**
3397  * @tc.number   Telephony_DriverSystem_UpdateCdmaSimMessage_V1_0100
3398  * @tc.name     Update cdma sim message
3399  * @tc.desc     Function test
3400  */
3401 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UpdateCdmaSimMessage_V1_0100, Function | MediumTest | Level3)
3402 {
3403     if (!IsReady(SLOTID_1)) {
3404         return;
3405     }
3406     SmsMessageIOInfo msgIoInfo;
3407     msgIoInfo.smscPdu = TEST_SMSC_PDU;
3408     msgIoInfo.pdu = TEST_STORAGE_PDU;
3409     msgIoInfo.state = static_cast<int32_t>(SimMessageStatus::SIM_MESSAGE_STATUS_SENT);
3410     msgIoInfo.index = 0;
3411     int32_t ret = g_rilInterface->UpdateCdmaSimMessage(SLOTID_1, GetSerialId(), msgIoInfo);
3412     WaitFor(WAIT_TIME_SECOND_LONG);
3413     EXPECT_EQ(SUCCESS, ret);
3414     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_UPDATE_CDMA_SIM_MESSAGE));
3415 }
3416 
3417 /**
3418  * @tc.number   Telephony_DriverSystem_UpdateCdmaSimMessage_V1_0200
3419  * @tc.name     Update cdma sim message
3420  * @tc.desc     Function test
3421  */
3422 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_UpdateCdmaSimMessage_V1_0200, Function | MediumTest | Level3)
3423 {
3424     if (!IsReady(SLOTID_2)) {
3425         return;
3426     }
3427     SmsMessageIOInfo msgIoInfo;
3428     msgIoInfo.smscPdu = TEST_SMSC_PDU;
3429     msgIoInfo.pdu = TEST_STORAGE_PDU;
3430     msgIoInfo.state = static_cast<int32_t>(SimMessageStatus::SIM_MESSAGE_STATUS_SENT);
3431     msgIoInfo.index = 0;
3432     int32_t ret = g_rilInterface->UpdateCdmaSimMessage(SLOTID_2, GetSerialId(), msgIoInfo);
3433     WaitFor(WAIT_TIME_SECOND_LONG);
3434     EXPECT_EQ(SUCCESS, ret);
3435     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_UPDATE_CDMA_SIM_MESSAGE));
3436 }
3437 
3438 /**
3439  * @tc.number   Telephony_DriverSystem_DelCdmaSimMessage_V1_0100
3440  * @tc.name     Delete cdma sim message
3441  * @tc.desc     Function test
3442  */
3443 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_DelCdmaSimMessage_V1_0100, Function | MediumTest | Level3)
3444 {
3445     if (!IsReady(SLOTID_1)) {
3446         return;
3447     }
3448     int32_t index = 0;
3449     int32_t ret = g_rilInterface->DelCdmaSimMessage(SLOTID_1, GetSerialId(), index);
3450     WaitFor(WAIT_TIME_SECOND_LONG);
3451     EXPECT_EQ(SUCCESS, ret);
3452     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_DEL_CDMA_SIM_MESSAGE));
3453 }
3454 
3455 /**
3456  * @tc.number   Telephony_DriverSystem_DelCdmaSimMessage_V1_0200
3457  * @tc.name     Delete cdma sim message
3458  * @tc.desc     Function test
3459  */
3460 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_DelCdmaSimMessage_V1_0200, Function | MediumTest | Level3)
3461 {
3462     if (!IsReady(SLOTID_2)) {
3463         return;
3464     }
3465     int32_t index = 0;
3466     int32_t ret = g_rilInterface->DelCdmaSimMessage(SLOTID_2, GetSerialId(), index);
3467     WaitFor(WAIT_TIME_SECOND_LONG);
3468     EXPECT_EQ(SUCCESS, ret);
3469     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_DEL_CDMA_SIM_MESSAGE));
3470 }
3471 
3472 /**
3473  * @tc.number   Telephony_DriverSystem_GetSmscAddr_V1_0100
3474  * @tc.name     Get smsc addr
3475  * @tc.desc     Function test
3476  */
3477 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetSmscAddr_V1_0100, Function | MediumTest | Level3)
3478 {
3479     if (!IsReady(SLOTID_1)) {
3480         return;
3481     }
3482     int32_t ret = g_rilInterface->GetSmscAddr(SLOTID_1, GetSerialId());
3483     WaitFor(WAIT_TIME_SECOND_LONG);
3484     EXPECT_EQ(SUCCESS, ret);
3485     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_GET_SMSC_ADDR));
3486 }
3487 
3488 /**
3489  * @tc.number   Telephony_DriverSystem_GetSmscAddr_V1_0200
3490  * @tc.name     Get smsc addr
3491  * @tc.desc     Function test
3492  */
3493 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetSmscAddr_V1_0200, Function | MediumTest | Level3)
3494 {
3495     if (!IsReady(SLOTID_2)) {
3496         return;
3497     }
3498     int32_t ret = g_rilInterface->GetSmscAddr(SLOTID_2, GetSerialId());
3499     WaitFor(WAIT_TIME_SECOND_LONG);
3500     EXPECT_EQ(SUCCESS, ret);
3501     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_GET_SMSC_ADDR));
3502 }
3503 
3504 /**
3505  * @tc.number   Telephony_DriverSystem_SetSmscAddr_V1_0100
3506  * @tc.name     Set smsc addr
3507  * @tc.desc     Function test
3508  */
3509 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetSmscAddr_V1_0100, Function | MediumTest | Level3)
3510 {
3511     if (!IsReady(SLOTID_1)) {
3512         return;
3513     }
3514     ServiceCenterAddress address;
3515     address.address = g_callback.GetSmscAddr();
3516     address.tosca = TEST_TOSCA;
3517     int32_t ret = g_rilInterface->SetSmscAddr(SLOTID_1, GetSerialId(), address);
3518     WaitFor(WAIT_TIME_SECOND_LONG);
3519     EXPECT_EQ(SUCCESS, ret);
3520     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SET_SMSC_ADDR));
3521 }
3522 
3523 /**
3524  * @tc.number   Telephony_DriverSystem_SetSmscAddr_V1_0200
3525  * @tc.name     Set smsc addr
3526  * @tc.desc     Function test
3527  */
3528 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetSmscAddr_V1_0200, Function | MediumTest | Level3)
3529 {
3530     if (!IsReady(SLOTID_2)) {
3531         return;
3532     }
3533     ServiceCenterAddress address;
3534     address.address = g_callback.GetSmscAddr();
3535     address.tosca = TEST_TOSCA;
3536     int32_t ret = g_rilInterface->SetSmscAddr(SLOTID_2, GetSerialId(), address);
3537     WaitFor(WAIT_TIME_SECOND_LONG);
3538     EXPECT_EQ(SUCCESS, ret);
3539     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SET_SMSC_ADDR));
3540 }
3541 
3542 /**
3543  * @tc.number   Telephony_DriverSystem_SetCBConfig_V1_0100
3544  * @tc.name     Set cb config
3545  * @tc.desc     Function test
3546  */
3547 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetCBConfig_V1_0100, Function | MediumTest | Level3)
3548 {
3549     if (!IsReady(SLOTID_1)) {
3550         return;
3551     }
3552     CBConfigInfo info;
3553     info.mode = 1;
3554     info.mids = TEST_ID_LIST;
3555     info.dcss = TEST_DCS_LIST;
3556     int32_t ret = g_rilInterface->SetCBConfig(SLOTID_1, GetSerialId(), info);
3557     WaitFor(WAIT_TIME_SECOND_LONG);
3558     EXPECT_EQ(SUCCESS, ret);
3559     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SET_CB_CONFIG));
3560 }
3561 
3562 /**
3563  * @tc.number   Telephony_DriverSystem_SetCBConfig_V1_0200
3564  * @tc.name     Set cb config
3565  * @tc.desc     Function test
3566  */
3567 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetCBConfig_V1_0200, Function | MediumTest | Level3)
3568 {
3569     if (!IsReady(SLOTID_2)) {
3570         return;
3571     }
3572     CBConfigInfo info;
3573     info.mode = 1;
3574     info.mids = TEST_ID_LIST;
3575     info.dcss = TEST_DCS_LIST;
3576     int32_t ret = g_rilInterface->SetCBConfig(SLOTID_2, GetSerialId(), info);
3577     WaitFor(WAIT_TIME_SECOND_LONG);
3578     EXPECT_EQ(SUCCESS, ret);
3579     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SET_CB_CONFIG));
3580 }
3581 
3582 /**
3583  * @tc.number   Telephony_DriverSystem_GetCBConfig_V1_0100
3584  * @tc.name     Get cb config
3585  * @tc.desc     Function test
3586  */
3587 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCBConfig_V1_0100, Function | MediumTest | Level3)
3588 {
3589     if (!IsReady(SLOTID_1)) {
3590         return;
3591     }
3592     int32_t ret = g_rilInterface->GetCBConfig(SLOTID_1, GetSerialId());
3593     WaitFor(WAIT_TIME_SECOND_LONG);
3594     EXPECT_EQ(SUCCESS, ret);
3595     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_GET_CB_CONFIG));
3596 }
3597 
3598 /**
3599  * @tc.number   Telephony_DriverSystem_GetCBConfig_V1_0200
3600  * @tc.name     Get cb config
3601  * @tc.desc     Function test
3602  */
3603 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCBConfig_V1_0200, Function | MediumTest | Level3)
3604 {
3605     if (!IsReady(SLOTID_2)) {
3606         return;
3607     }
3608     int32_t ret = g_rilInterface->GetCBConfig(SLOTID_2, GetSerialId());
3609     WaitFor(WAIT_TIME_SECOND_LONG);
3610     EXPECT_EQ(SUCCESS, ret);
3611     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_GET_CB_CONFIG));
3612 }
3613 
3614 /**
3615  * @tc.number   Telephony_DriverSystem_SetCdmaCBConfig_V1_0100
3616  * @tc.name     Set cdma cb config
3617  * @tc.desc     Function test
3618  */
3619 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetCdmaCBConfig_V1_0100, Function | MediumTest | Level3)
3620 {
3621     if (!IsReady(SLOTID_1)) {
3622         return;
3623     }
3624     CdmaCBConfigInfoList broadcastInfoList = {};
3625     int32_t ret = g_rilInterface->SetCdmaCBConfig(SLOTID_1, GetSerialId(), broadcastInfoList);
3626     WaitFor(WAIT_TIME_SECOND_LONG);
3627     EXPECT_EQ(SUCCESS, ret);
3628     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SET_CDMA_CB_CONFIG));
3629 }
3630 
3631 /**
3632  * @tc.number   Telephony_DriverSystem_SetCdmaCBConfig_V1_0200
3633  * @tc.name     Set cdma cb config
3634  * @tc.desc     Function test
3635  */
3636 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SetCdmaCBConfig_V1_0200, Function | MediumTest | Level3)
3637 {
3638     if (!IsReady(SLOTID_2)) {
3639         return;
3640     }
3641     CdmaCBConfigInfoList broadcastInfoList = {};
3642     int32_t ret = g_rilInterface->SetCdmaCBConfig(SLOTID_2, GetSerialId(), broadcastInfoList);
3643     WaitFor(WAIT_TIME_SECOND_LONG);
3644     EXPECT_EQ(SUCCESS, ret);
3645     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SET_CDMA_CB_CONFIG));
3646 }
3647 
3648 /**
3649  * @tc.number   Telephony_DriverSystem_GetCdmaCBConfig_V1_0100
3650  * @tc.name     Get cdma cb config
3651  * @tc.desc     Function test
3652  */
3653 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCdmaCBConfig_V1_0100, Function | MediumTest | Level3)
3654 {
3655     if (!IsReady(SLOTID_1)) {
3656         return;
3657     }
3658     int32_t ret = g_rilInterface->GetCdmaCBConfig(SLOTID_1, GetSerialId());
3659     WaitFor(WAIT_TIME_SECOND_LONG);
3660     EXPECT_EQ(SUCCESS, ret);
3661     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_GET_CDMA_CB_CONFIG));
3662 }
3663 
3664 /**
3665  * @tc.number   Telephony_DriverSystem_GetCdmaCBConfig_V1_0200
3666  * @tc.name     Get cdma cb config
3667  * @tc.desc     Function test
3668  */
3669 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_GetCdmaCBConfig_V1_0200, Function | MediumTest | Level3)
3670 {
3671     if (!IsReady(SLOTID_2)) {
3672         return;
3673     }
3674     int32_t ret = g_rilInterface->GetCdmaCBConfig(SLOTID_2, GetSerialId());
3675     WaitFor(WAIT_TIME_SECOND_LONG);
3676     EXPECT_EQ(SUCCESS, ret);
3677     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_GET_CDMA_CB_CONFIG));
3678 }
3679 
3680 /**
3681  * @tc.number   Telephony_DriverSystem_SendSmsMoreMode_V1_0100
3682  * @tc.name     Send sms more mode
3683  * @tc.desc     Function test
3684  */
3685 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SendSmsMoreMode_V1_0100, Function | MediumTest | Level3)
3686 {
3687     if (!IsReady(SLOTID_1)) {
3688         return;
3689     }
3690     GsmSmsMessageInfo msg;
3691     msg.smscPdu = TEST_SMSC_PDU;
3692     msg.pdu = TEST_SEND_PDU;
3693     int32_t ret = g_rilInterface->SendSmsMoreMode(SLOTID_1, GetSerialId(), msg);
3694     WaitFor(WAIT_TIME_SECOND_LONG);
3695     EXPECT_EQ(SUCCESS, ret);
3696     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SEND_SMS_MORE_MODE));
3697 }
3698 
3699 /**
3700  * @tc.number   Telephony_DriverSystem_SendSmsMoreMode_V1_0200
3701  * @tc.name     Send sms more mode
3702  * @tc.desc     Function test
3703  */
3704 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SendSmsMoreMode_V1_0200, Function | MediumTest | Level3)
3705 {
3706     if (!IsReady(SLOTID_2)) {
3707         return;
3708     }
3709     GsmSmsMessageInfo msg;
3710     msg.smscPdu = TEST_SMSC_PDU;
3711     msg.pdu = TEST_SEND_PDU;
3712     int32_t ret = g_rilInterface->SendSmsMoreMode(SLOTID_2, GetSerialId(), msg);
3713     WaitFor(WAIT_TIME_SECOND_LONG);
3714     EXPECT_EQ(SUCCESS, ret);
3715     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SEND_SMS_MORE_MODE));
3716 }
3717 
3718 /**
3719  * @tc.number   Telephony_DriverSystem_SendSmsAck_V1_0100
3720  * @tc.name     Send sms ack
3721  * @tc.desc     Function test
3722  */
3723 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SendSmsAck_V1_0100, Function | MediumTest | Level3)
3724 {
3725     if (!IsReady(SLOTID_1)) {
3726         return;
3727     }
3728     ModeData data;
3729     data.result = TEST_RESULT;
3730     data.mode = TEST_MODE;
3731     int32_t ret = g_rilInterface->SendSmsAck(SLOTID_1, GetSerialId(), data);
3732     WaitFor(WAIT_TIME_SECOND_LONG);
3733     EXPECT_EQ(SUCCESS, ret);
3734     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SEND_SMS_ACK));
3735 }
3736 
3737 /**
3738  * @tc.number   Telephony_DriverSystem_SendSmsAck_V1_0200
3739  * @tc.name     Send sms ack
3740  * @tc.desc     Function test
3741  */
3742 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SendSmsAck_V1_0200, Function | MediumTest | Level3)
3743 {
3744     if (!IsReady(SLOTID_2)) {
3745         return;
3746     }
3747     ModeData data;
3748     data.result = TEST_RESULT;
3749     data.mode = TEST_MODE;
3750     int32_t ret = g_rilInterface->SendSmsAck(SLOTID_2, GetSerialId(), data);
3751     WaitFor(WAIT_TIME_SECOND_LONG);
3752     EXPECT_EQ(SUCCESS, ret);
3753     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SEND_SMS_ACK));
3754 }
3755 
3756 /**
3757  * @tc.number   Telephony_DriverSystem_SendGsmSms_V1_0100
3758  * @tc.name     Send gsm sms
3759  * @tc.desc     Function test
3760  */
3761 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SendGsmSms_V1_0100, Function | MediumTest | Level3)
3762 {
3763     if (!IsReady(SLOTID_1)) {
3764         return;
3765     }
3766     GsmSmsMessageInfo msg;
3767     msg.smscPdu = TEST_SMSC_PDU;
3768     msg.pdu = TEST_SEND_PDU;
3769     int32_t ret = g_rilInterface->SendGsmSms(SLOTID_1, GetSerialId(), msg);
3770     WaitFor(WAIT_TIME_SECOND_LONG);
3771     EXPECT_EQ(SUCCESS, ret);
3772     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SEND_GSM_SMS));
3773 }
3774 
3775 /**
3776  * @tc.number   Telephony_DriverSystem_SendGsmSms_V1_0200
3777  * @tc.name     Send gsm sms
3778  * @tc.desc     Function test
3779  */
3780 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SendGsmSms_V1_0200, Function | MediumTest | Level3)
3781 {
3782     if (!IsReady(SLOTID_2)) {
3783         return;
3784     }
3785     GsmSmsMessageInfo msg;
3786     msg.smscPdu = TEST_SMSC_PDU;
3787     msg.pdu = TEST_SEND_PDU;
3788     int32_t ret = g_rilInterface->SendGsmSms(SLOTID_2, GetSerialId(), msg);
3789     WaitFor(WAIT_TIME_SECOND_LONG);
3790     EXPECT_EQ(SUCCESS, ret);
3791     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SEND_GSM_SMS));
3792 }
3793 
3794 /**
3795  * @tc.number   Telephony_DriverSystem_SendGsmSms_V1_0200
3796  * @tc.name     Send cdma sms
3797  * @tc.desc     Function test
3798  */
3799 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SendCdmaSms_V1_0100, Function | MediumTest | Level3)
3800 {
3801     if (!IsReady(SLOTID_1)) {
3802         return;
3803     }
3804     SendCdmaSmsMessageInfo msg;
3805     msg.smscPdu = TEST_CDMA_PDU;
3806     int32_t ret = g_rilInterface->SendCdmaSms(SLOTID_1, GetSerialId(), msg);
3807     WaitFor(WAIT_TIME_SECOND_LONG);
3808     EXPECT_EQ(SUCCESS, ret);
3809     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SEND_CDMA_SMS));
3810 }
3811 
3812 /**
3813  * @tc.number   Telephony_DriverSystem_SendCdmaSms_V1_0200
3814  * @tc.name     Send cdma sms
3815  * @tc.desc     Function test
3816  */
3817 HWTEST_F(RilInterfaceTest, Telephony_DriverSystem_SendCdmaSms_V1_0200, Function | MediumTest | Level3)
3818 {
3819     if (!IsReady(SLOTID_2)) {
3820         return;
3821     }
3822     SendCdmaSmsMessageInfo msg;
3823     msg.smscPdu = TEST_CDMA_PDU;
3824     int32_t ret = g_rilInterface->SendCdmaSms(SLOTID_2, GetSerialId(), msg);
3825     WaitFor(WAIT_TIME_SECOND_LONG);
3826     EXPECT_EQ(SUCCESS, ret);
3827     ASSERT_TRUE(GetBoolResult(HdiId::HREQ_SMS_SEND_CDMA_SMS));
3828 }
3829 
3830 } // namespace Telephony
3831 } // namespace OHOS
3832