1 /*
2 * Copyright (C) 2023 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_call_test.h"
17 #include "ril_test_util.h"
18
19 namespace OHOS {
20 namespace Telephony {
21 using namespace OHOS::HDI::Ril::V1_1;
22 using namespace testing::ext;
23
24 namespace {
25 sptr<IRil> g_rilInterface = nullptr;
26 }
27
SetUpTestCase()28 void RilCallTest::SetUpTestCase()
29 {
30 TELEPHONY_LOGI("----------RilCallTest gtest start ------------");
31 RilTestUtil::GetInstance().Init();
32 g_rilInterface = RilTestUtil::GetRilInterface();
33 }
34
TearDownTestCase()35 void RilCallTest::TearDownTestCase() {}
36
SetUp()37 void RilCallTest::SetUp() {}
38
TearDown()39 void RilCallTest::TearDown() {}
40
41 /**
42 * @tc.number SendRilAck
43 * @tc.name Send ril ack
44 * @tc.desc Function test
45 */
46 HWTEST_F(RilCallTest, SendRilAck, Function | MediumTest | Level1)
47 {
48 if (g_rilInterface == nullptr) {
49 return;
50 }
51 int32_t ret = g_rilInterface->SendRilAck();
52 EXPECT_EQ(SUCCESS, ret);
53 }
54
55 /**
56 * @tc.number Telephony_DriverSystem_GetEmergencyCallList_V1_0100
57 * @tc.name Get emergency call list
58 * @tc.desc Function test
59 */
60 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetEmergencyCallList_V1_0100, Function | MediumTest | Level3)
61 {
62 if (!RilTestUtil::IsReady(SLOTID_1)) {
63 return;
64 }
65 int32_t ret = g_rilInterface->GetEmergencyCallList(SLOTID_1, RilTestUtil::GetSerialId());
66 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
67 EXPECT_EQ(SUCCESS, ret);
68 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_EMERGENCY_LIST));
69 }
70
71 /**
72 * @tc.number Telephony_DriverSystem_GetEmergencyCallList_V1_0200
73 * @tc.name Get emergency call list
74 * @tc.desc Function test
75 */
76 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetEmergencyCallList_V1_0200, Function | MediumTest | Level3)
77 {
78 if (!RilTestUtil::IsReady(SLOTID_2)) {
79 return;
80 }
81 int32_t ret = g_rilInterface->GetEmergencyCallList(SLOTID_2, RilTestUtil::GetSerialId());
82 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
83 EXPECT_EQ(SUCCESS, ret);
84 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_EMERGENCY_LIST));
85 }
86
87 /**
88 * @tc.number Telephony_DriverSystem_SetEmergencyCallList_V1_0100
89 * @tc.name Set emergency call list
90 * @tc.desc Function test
91 */
92 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetEmergencyCallList_V1_0100, Function | MediumTest | Level3)
93 {
94 if (!RilTestUtil::IsReady(SLOTID_1)) {
95 return;
96 }
97 EmergencyInfoList emergencyInfoList;
98 EmergencyCall emergencyInfo = {};
99 emergencyInfo.index = 1;
100 emergencyInfo.total = 1;
101 emergencyInfo.eccNum = "120";
102 emergencyInfo.eccType = EccType::TYPE_CATEGORY;
103 emergencyInfo.simpresent = SimpresentType::TYPE_HAS_CARD;
104 emergencyInfo.mcc = "460";
105 emergencyInfo.abnormalService = AbnormalServiceType::TYPE_ALL;
106 emergencyInfoList.calls.push_back(emergencyInfo);
107 int32_t ret = g_rilInterface->SetEmergencyCallList(SLOTID_1, RilTestUtil::GetSerialId(), emergencyInfoList);
108 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
109 EXPECT_EQ(SUCCESS, ret);
110 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_EMERGENCY_LIST));
111 }
112
113 /**
114 * @tc.number Telephony_DriverSystem_SetEmergencyCallList_V2_0100
115 * @tc.name Set emergency call list
116 * @tc.desc Function test
117 */
118 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetEmergencyCallList_V2_0100, Function | MediumTest | Level3)
119 {
120 if (!RilTestUtil::IsReady(SLOTID_2)) {
121 return;
122 }
123 EmergencyInfoList emergencyInfoList;
124 EmergencyCall emergencyInfo = {};
125 emergencyInfo.index = 1;
126 emergencyInfo.total = 1;
127 emergencyInfo.eccNum = "120";
128 emergencyInfo.eccType = EccType::TYPE_CATEGORY;
129 emergencyInfo.simpresent = SimpresentType::TYPE_HAS_CARD;
130 emergencyInfo.mcc = "460";
131 emergencyInfo.abnormalService = AbnormalServiceType::TYPE_ALL;
132 emergencyInfoList.calls.push_back(emergencyInfo);
133 int32_t ret = g_rilInterface->SetEmergencyCallList(SLOTID_2, RilTestUtil::GetSerialId(), emergencyInfoList);
134 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
135 EXPECT_EQ(SUCCESS, ret);
136 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_EMERGENCY_LIST));
137 }
138
139 /**
140 * @tc.number Telephony_DriverSystem_GetCallList_V1_0100
141 * @tc.name Get call list
142 * @tc.desc Function test
143 */
144 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetCallList_V1_0100, Function | MediumTest | Level3)
145 {
146 if (!RilTestUtil::IsReady(SLOTID_1)) {
147 return;
148 }
149 int32_t ret = g_rilInterface->GetCallList(SLOTID_1, RilTestUtil::GetSerialId());
150 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
151 EXPECT_EQ(SUCCESS, ret);
152 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CALL_LIST));
153 }
154
155 /**
156 * @tc.number Telephony_DriverSystem_GetCallList_V1_0200
157 * @tc.name Get call list
158 * @tc.desc Function test
159 */
160 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetCallList_V1_0200, Function | MediumTest | Level3)
161 {
162 if (!RilTestUtil::IsReady(SLOTID_2)) {
163 return;
164 }
165 int32_t ret = g_rilInterface->GetCallList(SLOTID_2, RilTestUtil::GetSerialId());
166 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
167 EXPECT_EQ(SUCCESS, ret);
168 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CALL_LIST));
169 }
170
171 /**
172 * @tc.number Telephony_DriverSystem_GetCallList_V1_0200
173 * @tc.name Get call list
174 * @tc.desc Function test
175 */
176 HWTEST_F(RilCallTest, Telephony_DriverSystem_Dial_V1_0100, Function | MediumTest | Level2)
177 {
178 if (!RilTestUtil::IsReady(SLOTID_1)) {
179 return;
180 }
181 DialInfo dialInfo = {};
182 dialInfo.address = "10086";
183 dialInfo.clir = 0;
184 int32_t ret = g_rilInterface->Dial(SLOTID_1, RilTestUtil::GetSerialId(), dialInfo);
185 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
186 EXPECT_EQ(SUCCESS, ret);
187 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_DIAL));
188 }
189
190 /**
191 * @tc.number Telephony_DriverSystem_Dial_V1_0200
192 * @tc.name Dial
193 * @tc.desc Function test
194 */
195 HWTEST_F(RilCallTest, Telephony_DriverSystem_Dial_V1_0200, Function | MediumTest | Level2)
196 {
197 if (!RilTestUtil::IsReady(SLOTID_2)) {
198 return;
199 }
200 DialInfo dialInfo = {};
201 dialInfo.address = "10086";
202 dialInfo.clir = 0;
203 int32_t ret = g_rilInterface->Dial(SLOTID_2, RilTestUtil::GetSerialId(), dialInfo);
204 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
205 EXPECT_EQ(SUCCESS, ret);
206 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_DIAL));
207 }
208
209 /**
210 * @tc.number Telephony_DriverSystem_Reject_V1_0100
211 * @tc.name Reject
212 * @tc.desc Function test
213 */
214 HWTEST_F(RilCallTest, Telephony_DriverSystem_Reject_V1_0100, Function | MediumTest | Level3)
215 {
216 if (!RilTestUtil::IsReady(SLOTID_1)) {
217 return;
218 }
219 int32_t ret = g_rilInterface->Reject(SLOTID_1, RilTestUtil::GetSerialId());
220 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
221 EXPECT_EQ(SUCCESS, ret);
222 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_REJECT));
223 }
224
225 /**
226 * @tc.number Telephony_DriverSystem_Reject_V1_0200
227 * @tc.name Reject
228 * @tc.desc Function test
229 */
230 HWTEST_F(RilCallTest, Telephony_DriverSystem_Reject_V1_0200, Function | MediumTest | Level3)
231 {
232 if (!RilTestUtil::IsReady(SLOTID_2)) {
233 return;
234 }
235 int32_t ret = g_rilInterface->Reject(SLOTID_2, RilTestUtil::GetSerialId());
236 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
237 EXPECT_EQ(SUCCESS, ret);
238 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_REJECT));
239 }
240
241 /**
242 * @tc.number Telephony_DriverSystem_Hangup_V1_0100
243 * @tc.name Hangup
244 * @tc.desc Function test
245 */
246 HWTEST_F(RilCallTest, Telephony_DriverSystem_Hangup_V1_0100, Function | MediumTest | Level3)
247 {
248 if (!RilTestUtil::IsReady(SLOTID_1)) {
249 return;
250 }
251 int32_t ret = g_rilInterface->Hangup(SLOTID_1, RilTestUtil::GetSerialId(), 0);
252 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
253 EXPECT_EQ(SUCCESS, ret);
254 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_HANGUP));
255 }
256
257 /**
258 * @tc.number Telephony_DriverSystem_Hangup_V1_0200
259 * @tc.name Hangup
260 * @tc.desc Function test
261 */
262 HWTEST_F(RilCallTest, Telephony_DriverSystem_Hangup_V1_0200, Function | MediumTest | Level3)
263 {
264 if (!RilTestUtil::IsReady(SLOTID_2)) {
265 return;
266 }
267 int32_t ret = g_rilInterface->Hangup(SLOTID_2, RilTestUtil::GetSerialId(), 0);
268 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
269 EXPECT_EQ(SUCCESS, ret);
270 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_HANGUP));
271 }
272
273 /**
274 * @tc.number Telephony_DriverSystem_Answer_V1_0100
275 * @tc.name Answer
276 * @tc.desc Function test
277 */
278 HWTEST_F(RilCallTest, Telephony_DriverSystem_Answer_V1_0100, Function | MediumTest | Level3)
279 {
280 if (!RilTestUtil::IsReady(SLOTID_1)) {
281 return;
282 }
283 int32_t ret = g_rilInterface->Answer(SLOTID_1, RilTestUtil::GetSerialId());
284 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
285 EXPECT_EQ(SUCCESS, ret);
286 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_ANSWER));
287 }
288
289 /**
290 * @tc.number Telephony_DriverSystem_Answer_V1_0200
291 * @tc.name Answer
292 * @tc.desc Function test
293 */
294 HWTEST_F(RilCallTest, Telephony_DriverSystem_Answer_V1_0200, Function | MediumTest | Level3)
295 {
296 if (!RilTestUtil::IsReady(SLOTID_2)) {
297 return;
298 }
299 int32_t ret = g_rilInterface->Answer(SLOTID_2, RilTestUtil::GetSerialId());
300 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
301 EXPECT_EQ(SUCCESS, ret);
302 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_ANSWER));
303 }
304
305 /**
306 * @tc.number Telephony_DriverSystem_HoldCall_V1_0100
307 * @tc.name HoldCall
308 * @tc.desc Function test
309 */
310 HWTEST_F(RilCallTest, Telephony_DriverSystem_HoldCall_V1_0100, Function | MediumTest | Level3)
311 {
312 if (!RilTestUtil::IsReady(SLOTID_1)) {
313 return;
314 }
315 int32_t ret = g_rilInterface->HoldCall(SLOTID_1, RilTestUtil::GetSerialId());
316 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
317 EXPECT_EQ(SUCCESS, ret);
318 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_HOLD_CALL));
319 }
320
321 /**
322 * @tc.number Telephony_DriverSystem_HoldCall_V1_0200
323 * @tc.name HoldCall
324 * @tc.desc Function test
325 */
326 HWTEST_F(RilCallTest, Telephony_DriverSystem_HoldCall_V1_0200, Function | MediumTest | Level3)
327 {
328 if (!RilTestUtil::IsReady(SLOTID_2)) {
329 return;
330 }
331 int32_t ret = g_rilInterface->HoldCall(SLOTID_2, RilTestUtil::GetSerialId());
332 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
333 EXPECT_EQ(SUCCESS, ret);
334 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_HOLD_CALL));
335 }
336
337 /**
338 * @tc.number Telephony_DriverSystem_UnHoldCall_V1_0100
339 * @tc.name UnHoldCall
340 * @tc.desc Function test
341 */
342 HWTEST_F(RilCallTest, Telephony_DriverSystem_UnHoldCall_V1_0100, Function | MediumTest | Level3)
343 {
344 if (!RilTestUtil::IsReady(SLOTID_1)) {
345 return;
346 }
347 int32_t ret = g_rilInterface->UnHoldCall(SLOTID_1, RilTestUtil::GetSerialId());
348 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
349 EXPECT_EQ(SUCCESS, ret);
350 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_UNHOLD_CALL));
351 }
352
353 /**
354 * @tc.number Telephony_DriverSystem_UnHoldCall_V1_0200
355 * @tc.name UnHoldCall
356 * @tc.desc Function test
357 */
358 HWTEST_F(RilCallTest, Telephony_DriverSystem_UnHoldCall_V1_0200, Function | MediumTest | Level3)
359 {
360 if (!RilTestUtil::IsReady(SLOTID_2)) {
361 return;
362 }
363 int32_t ret = g_rilInterface->UnHoldCall(SLOTID_2, RilTestUtil::GetSerialId());
364 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
365 EXPECT_EQ(SUCCESS, ret);
366 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_UNHOLD_CALL));
367 }
368
369 /**
370 * @tc.number Telephony_DriverSystem_SwitchCall_V1_0100
371 * @tc.name Switch call
372 * @tc.desc Function test
373 */
374 HWTEST_F(RilCallTest, Telephony_DriverSystem_SwitchCall_V1_0100, Function | MediumTest | Level3)
375 {
376 if (!RilTestUtil::IsReady(SLOTID_1)) {
377 return;
378 }
379 int32_t ret = g_rilInterface->SwitchCall(SLOTID_1, RilTestUtil::GetSerialId());
380 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
381 EXPECT_EQ(SUCCESS, ret);
382 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SWITCH_CALL));
383 }
384
385 /**
386 * @tc.number Telephony_DriverSystem_SwitchCall_V1_0200
387 * @tc.name Switch call
388 * @tc.desc Function test
389 */
390 HWTEST_F(RilCallTest, Telephony_DriverSystem_SwitchCall_V1_0200, Function | MediumTest | Level3)
391 {
392 if (!RilTestUtil::IsReady(SLOTID_2)) {
393 return;
394 }
395 int32_t ret = g_rilInterface->SwitchCall(SLOTID_2, RilTestUtil::GetSerialId());
396 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
397 EXPECT_EQ(SUCCESS, ret);
398 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SWITCH_CALL));
399 }
400
401 /**
402 * @tc.number Telephony_DriverSystem_CombineConference_V1_0100
403 * @tc.name Combine conference
404 * @tc.desc Function test
405 */
406 HWTEST_F(RilCallTest, Telephony_DriverSystem_CombineConference_V1_0100, Function | MediumTest | Level3)
407 {
408 if (!RilTestUtil::IsReady(SLOTID_1)) {
409 return;
410 }
411 int32_t ret = g_rilInterface->CombineConference(SLOTID_1, RilTestUtil::GetSerialId(), 0);
412 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
413 EXPECT_EQ(SUCCESS, ret);
414 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_COMBINE_CONFERENCE));
415 }
416
417 /**
418 * @tc.number Telephony_DriverSystem_CombineConference_V1_0200
419 * @tc.name Combine conference
420 * @tc.desc Function test
421 */
422 HWTEST_F(RilCallTest, Telephony_DriverSystem_CombineConference_V1_0200, Function | MediumTest | Level3)
423 {
424 if (!RilTestUtil::IsReady(SLOTID_2)) {
425 return;
426 }
427 int32_t ret = g_rilInterface->CombineConference(SLOTID_2, RilTestUtil::GetSerialId(), 0);
428 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
429 EXPECT_EQ(SUCCESS, ret);
430 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_COMBINE_CONFERENCE));
431 }
432
433 /**
434 * @tc.number Telephony_DriverSystem_SeparateConference_V1_0100
435 * @tc.name Separate conference
436 * @tc.desc Function test
437 */
438 HWTEST_F(RilCallTest, Telephony_DriverSystem_SeparateConference_V1_0100, Function | MediumTest | Level3)
439 {
440 if (!RilTestUtil::IsReady(SLOTID_1)) {
441 return;
442 }
443 int32_t ret = g_rilInterface->SeparateConference(SLOTID_1, RilTestUtil::GetSerialId(), 1, 0);
444 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
445 EXPECT_EQ(SUCCESS, ret);
446 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SEPARATE_CONFERENCE));
447 }
448
449 /**
450 * @tc.number Telephony_DriverSystem_SeparateConference_V1_0200
451 * @tc.name Separate conference
452 * @tc.desc Function test
453 */
454 HWTEST_F(RilCallTest, Telephony_DriverSystem_SeparateConference_V1_0200, Function | MediumTest | Level3)
455 {
456 if (!RilTestUtil::IsReady(SLOTID_2)) {
457 return;
458 }
459 int32_t ret = g_rilInterface->SeparateConference(SLOTID_2, RilTestUtil::GetSerialId(), 1, 0);
460 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
461 EXPECT_EQ(SUCCESS, ret);
462 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SEPARATE_CONFERENCE));
463 }
464
465 /**
466 * @tc.number Telephony_DriverSystem_GetCallWaiting_V1_0100
467 * @tc.name Get call waiting
468 * @tc.desc Function test
469 */
470 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetCallWaiting_V1_0100, Function | MediumTest | Level3)
471 {
472 if (!RilTestUtil::IsReady(SLOTID_1)) {
473 return;
474 }
475 int32_t ret = g_rilInterface->GetCallWaiting(SLOTID_1, RilTestUtil::GetSerialId());
476 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
477 EXPECT_EQ(SUCCESS, ret);
478 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CALL_WAITING));
479 }
480
481 /**
482 * @tc.number Telephony_DriverSystem_GetCallWaiting_V1_0200
483 * @tc.name Get call waiting
484 * @tc.desc Function test
485 */
486 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetCallWaiting_V1_0200, Function | MediumTest | Level3)
487 {
488 if (!RilTestUtil::IsReady(SLOTID_2)) {
489 return;
490 }
491 int32_t ret = g_rilInterface->GetCallWaiting(SLOTID_2, RilTestUtil::GetSerialId());
492 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
493 EXPECT_EQ(SUCCESS, ret);
494 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CALL_WAITING));
495 }
496
497 /**
498 * @tc.number Telephony_DriverSystem_SetCallWaiting_V1_0100
499 * @tc.name Set call waiting
500 * @tc.desc Function test
501 */
502 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetCallWaiting_V1_0100, Function | MediumTest | Level3)
503 {
504 if (!RilTestUtil::IsReady(SLOTID_1)) {
505 return;
506 }
507 int32_t ret = g_rilInterface->SetCallWaiting(SLOTID_1, RilTestUtil::GetSerialId(), 0);
508 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
509 EXPECT_EQ(SUCCESS, ret);
510 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_CALL_WAITING));
511 }
512
513 /**
514 * @tc.number Telephony_DriverSystem_SetCallWaiting_V1_0200
515 * @tc.name Set call waiting
516 * @tc.desc Function test
517 */
518 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetCallWaiting_V1_0200, Function | MediumTest | Level3)
519 {
520 if (!RilTestUtil::IsReady(SLOTID_2)) {
521 return;
522 }
523 int32_t ret = g_rilInterface->SetCallWaiting(SLOTID_2, RilTestUtil::GetSerialId(), 0);
524 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
525 EXPECT_EQ(SUCCESS, ret);
526 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_CALL_WAITING));
527 }
528
529 /**
530 * @tc.number Telephony_DriverSystem_GetCallTransferInfo_V1_0100
531 * @tc.name Get call transfer info
532 * @tc.desc Function test
533 */
534 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetCallTransferInfo_V1_0100, Function | MediumTest | Level3)
535 {
536 if (!RilTestUtil::IsReady(SLOTID_1)) {
537 return;
538 }
539 int32_t ret = g_rilInterface->GetCallTransferInfo(SLOTID_1, RilTestUtil::GetSerialId(), 1);
540 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
541 EXPECT_EQ(SUCCESS, ret);
542 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CALL_TRANSFER_INFO));
543 }
544
545 /**
546 * @tc.number Telephony_DriverSystem_GetCallTransferInfo_V1_0200
547 * @tc.name Get call transfer info
548 * @tc.desc Function test
549 */
550 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetCallTransferInfo_V1_0200, Function | MediumTest | Level3)
551 {
552 if (!RilTestUtil::IsReady(SLOTID_2)) {
553 return;
554 }
555 int32_t ret = g_rilInterface->GetCallTransferInfo(SLOTID_2, RilTestUtil::GetSerialId(), 1);
556 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
557 EXPECT_EQ(SUCCESS, ret);
558 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CALL_TRANSFER_INFO));
559 }
560
561 /**
562 * @tc.number Telephony_DriverSystem_SetCallTransferInfo_V1_0100
563 * @tc.name Set call transfer info
564 * @tc.desc Function test
565 */
566 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetCallTransferInfo_V1_0100, Function | MediumTest | Level3)
567 {
568 if (!RilTestUtil::IsReady(SLOTID_1)) {
569 return;
570 }
571 CallForwardSetInfo callForwardSetInfo = {};
572 callForwardSetInfo.reason = 1;
573 callForwardSetInfo.mode = 1;
574 callForwardSetInfo.classx = 1;
575 callForwardSetInfo.number = "10086";
576 int32_t ret = g_rilInterface->SetCallTransferInfo(SLOTID_1, RilTestUtil::GetSerialId(), callForwardSetInfo);
577 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
578 EXPECT_EQ(SUCCESS, ret);
579 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_CALL_TRANSFER_INFO));
580 }
581
582 /**
583 * @tc.number Telephony_DriverSystem_SetCallTransferInfo_V1_0200
584 * @tc.name Set call transfer info
585 * @tc.desc Function test
586 */
587 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetCallTransferInfo_V1_0200, Function | MediumTest | Level3)
588 {
589 if (!RilTestUtil::IsReady(SLOTID_2)) {
590 return;
591 }
592 CallForwardSetInfo callForwardSetInfo = {};
593 callForwardSetInfo.reason = 1;
594 callForwardSetInfo.mode = 1;
595 callForwardSetInfo.classx = 1;
596 callForwardSetInfo.number = "10086";
597 int32_t ret = g_rilInterface->SetCallTransferInfo(SLOTID_2, RilTestUtil::GetSerialId(), callForwardSetInfo);
598 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
599 EXPECT_EQ(SUCCESS, ret);
600 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_CALL_TRANSFER_INFO));
601 }
602
603 /**
604 * @tc.number Telephony_DriverSystem_GetCallRestriction_V1_0100
605 * @tc.name Get call restriction
606 * @tc.desc Function test
607 */
608 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetCallRestriction_V1_0100, Function | MediumTest | Level3)
609 {
610 if (!RilTestUtil::IsReady(SLOTID_1)) {
611 return;
612 }
613 std::string fac = "AO";
614 int32_t ret = g_rilInterface->GetCallRestriction(SLOTID_1, RilTestUtil::GetSerialId(), fac);
615 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
616 EXPECT_EQ(SUCCESS, ret);
617 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CALL_RESTRICTION));
618 }
619
620 /**
621 * @tc.number Telephony_DriverSystem_GetCallRestriction_V1_0200
622 * @tc.name Get call restriction
623 * @tc.desc Function test
624 */
625 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetCallRestriction_V1_0200, Function | MediumTest | Level3)
626 {
627 if (!RilTestUtil::IsReady(SLOTID_2)) {
628 return;
629 }
630 std::string fac = "AO";
631 int32_t ret = g_rilInterface->GetCallRestriction(SLOTID_2, RilTestUtil::GetSerialId(), fac);
632 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
633 EXPECT_EQ(SUCCESS, ret);
634 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CALL_RESTRICTION));
635 }
636
637 /**
638 * @tc.number Telephony_DriverSystem_SetCallRestriction_V1_0100
639 * @tc.name Set call restriction
640 * @tc.desc Function test
641 */
642 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetCallRestriction_V1_0100, Function | MediumTest | Level3)
643 {
644 if (!RilTestUtil::IsReady(SLOTID_1)) {
645 return;
646 }
647 CallRestrictionInfo callRestrictionInfo = {};
648 callRestrictionInfo.fac = "AO";
649 callRestrictionInfo.mode = 1;
650 callRestrictionInfo.password = "123456";
651 int32_t ret = g_rilInterface->SetCallRestriction(SLOTID_1, RilTestUtil::GetSerialId(), callRestrictionInfo);
652 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
653 EXPECT_EQ(SUCCESS, ret);
654 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_CALL_RESTRICTION));
655 }
656
657 /**
658 * @tc.number Telephony_DriverSystem_GetCallRestriction_V1_0200
659 * @tc.name Set call restriction
660 * @tc.desc Function test
661 */
662 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetCallRestriction_V1_0200, Function | MediumTest | Level3)
663 {
664 if (!RilTestUtil::IsReady(SLOTID_2)) {
665 return;
666 }
667 CallRestrictionInfo callRestrictionInfo = {};
668 callRestrictionInfo.fac = "AO";
669 callRestrictionInfo.mode = 1;
670 callRestrictionInfo.password = "123456";
671 int32_t ret = g_rilInterface->SetCallRestriction(SLOTID_2, RilTestUtil::GetSerialId(), callRestrictionInfo);
672 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
673 EXPECT_EQ(SUCCESS, ret);
674 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_CALL_RESTRICTION));
675 }
676
677 /**
678 * @tc.number Telephony_DriverSystem_GetClip_V1_0100
679 * @tc.name Get clip
680 * @tc.desc Function test
681 */
682 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetClip_V1_0100, Function | MediumTest | Level3)
683 {
684 if (!RilTestUtil::IsReady(SLOTID_1)) {
685 return;
686 }
687 int32_t ret = g_rilInterface->GetClip(SLOTID_1, RilTestUtil::GetSerialId());
688 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
689 EXPECT_EQ(SUCCESS, ret);
690 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CLIP));
691 }
692
693 /**
694 * @tc.number Telephony_DriverSystem_GetClip_V1_0200
695 * @tc.name Get clip
696 * @tc.desc Function test
697 */
698 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetClip_V1_0200, Function | MediumTest | Level3)
699 {
700 if (!RilTestUtil::IsReady(SLOTID_2)) {
701 return;
702 }
703 int32_t ret = g_rilInterface->GetClip(SLOTID_2, RilTestUtil::GetSerialId());
704 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
705 EXPECT_EQ(SUCCESS, ret);
706 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CLIP));
707 }
708
709 /**
710 * @tc.number Telephony_DriverSystem_SetClip_V1_0100
711 * @tc.name Set clip
712 * @tc.desc Function test
713 */
714 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetClip_V1_0100, Function | MediumTest | Level3)
715 {
716 if (!RilTestUtil::IsReady(SLOTID_1)) {
717 return;
718 }
719 int32_t ret = g_rilInterface->SetClip(SLOTID_1, RilTestUtil::GetSerialId(), 1);
720 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
721 EXPECT_EQ(SUCCESS, ret);
722 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_CLIP));
723 }
724
725 /**
726 * @tc.number Telephony_DriverSystem_SetClip_V1_0200
727 * @tc.name Set clip
728 * @tc.desc Function test
729 */
730 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetClip_V1_0200, Function | MediumTest | Level3)
731 {
732 if (!RilTestUtil::IsReady(SLOTID_2)) {
733 return;
734 }
735 int32_t ret = g_rilInterface->SetClip(SLOTID_2, RilTestUtil::GetSerialId(), 1);
736 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
737 EXPECT_EQ(SUCCESS, ret);
738 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_CLIP));
739 }
740
741 /**
742 * @tc.number Telephony_DriverSystem_GetClir_V1_0100
743 * @tc.name Get clip
744 * @tc.desc Function test
745 */
746 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetClir_V1_0100, Function | MediumTest | Level3)
747 {
748 if (!RilTestUtil::IsReady(SLOTID_1)) {
749 return;
750 }
751 int32_t ret = g_rilInterface->GetClir(SLOTID_1, RilTestUtil::GetSerialId());
752 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
753 EXPECT_EQ(SUCCESS, ret);
754 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CLIR));
755 }
756
757 /**
758 * @tc.number Telephony_DriverSystem_GetClir_V1_0200
759 * @tc.name Get clip
760 * @tc.desc Function test
761 */
762 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetClir_V1_0200, Function | MediumTest | Level3)
763 {
764 if (!RilTestUtil::IsReady(SLOTID_2)) {
765 return;
766 }
767 int32_t ret = g_rilInterface->GetClir(SLOTID_2, RilTestUtil::GetSerialId());
768 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
769 EXPECT_EQ(SUCCESS, ret);
770 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CLIR));
771 }
772
773 /**
774 * @tc.number Telephony_DriverSystem_SetClir_V1_0100
775 * @tc.name Set clir
776 * @tc.desc Function test
777 */
778 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetClir_V1_0100, Function | MediumTest | Level3)
779 {
780 if (!RilTestUtil::IsReady(SLOTID_1)) {
781 return;
782 }
783 int32_t ret = g_rilInterface->SetClir(SLOTID_1, RilTestUtil::GetSerialId(), 1);
784 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
785 EXPECT_EQ(SUCCESS, ret);
786 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_CLIR));
787 }
788
789 /**
790 * @tc.number Telephony_DriverSystem_SetClir_V1_0200
791 * @tc.name Set clir
792 * @tc.desc Function test
793 */
794 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetClir_V1_0200, Function | MediumTest | Level3)
795 {
796 if (!RilTestUtil::IsReady(SLOTID_2)) {
797 return;
798 }
799 int32_t ret = g_rilInterface->SetClir(SLOTID_2, RilTestUtil::GetSerialId(), 1);
800 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
801 EXPECT_EQ(SUCCESS, ret);
802 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_CLIR));
803 }
804
805 /**
806 * @tc.number Telephony_DriverSystem_SetCallPreferenceMode_V1_0100
807 * @tc.name Set call preference mode
808 * @tc.desc Function test
809 */
810 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetCallPreferenceMode_V1_0100, Function | MediumTest | Level3)
811 {
812 if (!RilTestUtil::IsReady(SLOTID_1)) {
813 return;
814 }
815 int32_t ret = g_rilInterface->SetCallPreferenceMode(SLOTID_1, RilTestUtil::GetSerialId(), 1);
816 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
817 EXPECT_EQ(SUCCESS, ret);
818 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_CALL_PREFERENCE));
819 }
820
821 /**
822 * @tc.number Telephony_DriverSystem_SetCallPreferenceMode_V1_0200
823 * @tc.name Set call preference mode
824 * @tc.desc Function test
825 */
826 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetCallPreferenceMode_V1_0200, Function | MediumTest | Level3)
827 {
828 if (!RilTestUtil::IsReady(SLOTID_2)) {
829 return;
830 }
831 int32_t ret = g_rilInterface->SetCallPreferenceMode(SLOTID_2, RilTestUtil::GetSerialId(), 1);
832 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
833 EXPECT_EQ(SUCCESS, ret);
834 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_CALL_PREFERENCE));
835 }
836
837 /**
838 * @tc.number Telephony_DriverSystem_GetCallPreferenceMode_V1_0100
839 * @tc.name Get call preference mode
840 * @tc.desc Function test
841 */
842 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetCallPreferenceMode_V1_0100, Function | MediumTest | Level3)
843 {
844 if (!RilTestUtil::IsReady(SLOTID_1)) {
845 return;
846 }
847 int32_t ret = g_rilInterface->GetCallPreferenceMode(SLOTID_1, RilTestUtil::GetSerialId());
848 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
849 EXPECT_EQ(SUCCESS, ret);
850 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CALL_PREFERENCE));
851 }
852
853 /**
854 * @tc.number Telephony_DriverSystem_SetCallPreferenceMode_V1_0200
855 * @tc.name Get call preference mode
856 * @tc.desc Function test
857 */
858 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetCallPreferenceMode_V1_0200, Function | MediumTest | Level3)
859 {
860 if (!RilTestUtil::IsReady(SLOTID_2)) {
861 return;
862 }
863 int32_t ret = g_rilInterface->GetCallPreferenceMode(SLOTID_2, RilTestUtil::GetSerialId());
864 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
865 EXPECT_EQ(SUCCESS, ret);
866 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_CALL_PREFERENCE));
867 }
868
869 /**
870 * @tc.number Telephony_DriverSystem_SetUssd_V1_0100
871 * @tc.name Set ussd
872 * @tc.desc Function test
873 */
874 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetUssd_V1_0100, Function | MediumTest | Level3)
875 {
876 if (!RilTestUtil::IsReady(SLOTID_1)) {
877 return;
878 }
879 int32_t ret = g_rilInterface->SetUssd(SLOTID_1, RilTestUtil::GetSerialId(), "12345678");
880 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
881 EXPECT_EQ(SUCCESS, ret);
882 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_USSD));
883 }
884
885 /**
886 * @tc.number Telephony_DriverSystem_SetUssd_V1_0200
887 * @tc.name Set ussd
888 * @tc.desc Function test
889 */
890 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetUssd_V1_0200, Function | MediumTest | Level3)
891 {
892 if (!RilTestUtil::IsReady(SLOTID_2)) {
893 return;
894 }
895 int32_t ret = g_rilInterface->SetUssd(SLOTID_2, RilTestUtil::GetSerialId(), "12345678");
896 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
897 EXPECT_EQ(SUCCESS, ret);
898 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_USSD));
899 }
900
901 /**
902 * @tc.number Telephony_DriverSystem_GetUssd_V1_0100
903 * @tc.name Get ussd
904 * @tc.desc Function test
905 */
906 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetUssd_V1_0100, Function | MediumTest | Level3)
907 {
908 if (!RilTestUtil::IsReady(SLOTID_1)) {
909 return;
910 }
911 int32_t ret = g_rilInterface->GetUssd(SLOTID_1, RilTestUtil::GetSerialId());
912 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
913 EXPECT_EQ(SUCCESS, ret);
914 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_USSD));
915 }
916
917 /**
918 * @tc.number Telephony_DriverSystem_GetUssd_V1_0200
919 * @tc.name Get ussd
920 * @tc.desc Function test
921 */
922 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetUssd_V1_0200, Function | MediumTest | Level3)
923 {
924 if (!RilTestUtil::IsReady(SLOTID_2)) {
925 return;
926 }
927 int32_t ret = g_rilInterface->GetUssd(SLOTID_2, RilTestUtil::GetSerialId());
928 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
929 EXPECT_EQ(SUCCESS, ret);
930 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_USSD));
931 }
932
933 /**
934 * @tc.number Telephony_DriverSystem_SetMute_V1_0100
935 * @tc.name Set mute
936 * @tc.desc Function test
937 */
938 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetMute_V1_0100, Function | MediumTest | Level3)
939 {
940 if (!RilTestUtil::IsReady(SLOTID_1)) {
941 return;
942 }
943 int32_t ret = g_rilInterface->SetMute(SLOTID_1, RilTestUtil::GetSerialId(), 1);
944 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
945 EXPECT_EQ(SUCCESS, ret);
946 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_MUTE));
947 }
948
949 /**
950 * @tc.number Telephony_DriverSystem_SetMute_V1_0200
951 * @tc.name Set mute
952 * @tc.desc Function test
953 */
954 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetMute_V1_0200, Function | MediumTest | Level3)
955 {
956 if (!RilTestUtil::IsReady(SLOTID_2)) {
957 return;
958 }
959 int32_t ret = g_rilInterface->SetMute(SLOTID_2, RilTestUtil::GetSerialId(), 1);
960 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
961 EXPECT_EQ(SUCCESS, ret);
962 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_MUTE));
963 }
964
965 /**
966 * @tc.number Telephony_DriverSystem_GetMute_V1_0100
967 * @tc.name Get mute
968 * @tc.desc Function test
969 */
970 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetMute_V1_0100, Function | MediumTest | Level3)
971 {
972 if (!RilTestUtil::IsReady(SLOTID_1)) {
973 return;
974 }
975 int32_t ret = g_rilInterface->GetMute(SLOTID_1, RilTestUtil::GetSerialId());
976 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
977 EXPECT_EQ(SUCCESS, ret);
978 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_MUTE));
979 }
980
981 /**
982 * @tc.number Telephony_DriverSystem_GetMute_V1_0200
983 * @tc.name Get mute
984 * @tc.desc Function test
985 */
986 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetMute_V1_0200, Function | MediumTest | Level3)
987 {
988 if (!RilTestUtil::IsReady(SLOTID_2)) {
989 return;
990 }
991 int32_t ret = g_rilInterface->GetMute(SLOTID_2, RilTestUtil::GetSerialId());
992 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
993 EXPECT_EQ(SUCCESS, ret);
994 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_MUTE));
995 }
996
997 /**
998 * @tc.number Telephony_DriverSystem_GetCallFailReason_V1_0100
999 * @tc.name Get call fail reason
1000 * @tc.desc Function test
1001 */
1002 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetCallFailReason_V1_0100, Function | MediumTest | Level3)
1003 {
1004 if (!RilTestUtil::IsReady(SLOTID_1)) {
1005 return;
1006 }
1007 int32_t ret = g_rilInterface->GetCallFailReason(SLOTID_1, RilTestUtil::GetSerialId());
1008 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1009 EXPECT_EQ(SUCCESS, ret);
1010 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_FAIL_REASON));
1011 }
1012
1013 /**
1014 * @tc.number Telephony_DriverSystem_GetCallFailReason_V1_0200
1015 * @tc.name Get call fail reason
1016 * @tc.desc Function test
1017 */
1018 HWTEST_F(RilCallTest, Telephony_DriverSystem_GetCallFailReason_V1_0200, Function | MediumTest | Level3)
1019 {
1020 if (!RilTestUtil::IsReady(SLOTID_2)) {
1021 return;
1022 }
1023 int32_t ret = g_rilInterface->GetCallFailReason(SLOTID_2, RilTestUtil::GetSerialId());
1024 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1025 EXPECT_EQ(SUCCESS, ret);
1026 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_GET_FAIL_REASON));
1027 }
1028
1029 /**
1030 * @tc.number Telephony_DriverSystem_CallSupplement_V1_0100
1031 * @tc.name Call supplement
1032 * @tc.desc Function test
1033 */
1034 HWTEST_F(RilCallTest, Telephony_DriverSystem_CallSupplement_V1_0100, Function | MediumTest | Level3)
1035 {
1036 if (!RilTestUtil::IsReady(SLOTID_1)) {
1037 return;
1038 }
1039 int32_t ret = g_rilInterface->CallSupplement(SLOTID_1, RilTestUtil::GetSerialId(), 1);
1040 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1041 EXPECT_EQ(SUCCESS, ret);
1042 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_CALL_SUPPLEMENT));
1043 }
1044
1045 /**
1046 * @tc.number Telephony_DriverSystem_CallSupplement_V1_0200
1047 * @tc.name Call supplement
1048 * @tc.desc Function test
1049 */
1050 HWTEST_F(RilCallTest, Telephony_DriverSystem_CallSupplement_V1_0200, Function | MediumTest | Level3)
1051 {
1052 if (!RilTestUtil::IsReady(SLOTID_2)) {
1053 return;
1054 }
1055 int32_t ret = g_rilInterface->CallSupplement(SLOTID_2, RilTestUtil::GetSerialId(), 1);
1056 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1057 EXPECT_EQ(SUCCESS, ret);
1058 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_CALL_SUPPLEMENT));
1059 }
1060
1061 /**
1062 * @tc.number Telephony_DriverSystem_SendDtmf_V1_0100
1063 * @tc.name Send dtmf
1064 * @tc.desc Function test
1065 */
1066 HWTEST_F(RilCallTest, Telephony_DriverSystem_SendDtmf_V1_0100, Function | MediumTest | Level3)
1067 {
1068 if (!RilTestUtil::IsReady(SLOTID_1)) {
1069 return;
1070 }
1071 DtmfInfo dtmfInfo = {};
1072 dtmfInfo.callId = 0;
1073 dtmfInfo.dtmfKey = "#";
1074 dtmfInfo.onLength = 300;
1075 dtmfInfo.offLength = 0;
1076 dtmfInfo.stringLength = 1;
1077 int32_t ret = g_rilInterface->SendDtmf(SLOTID_1, RilTestUtil::GetSerialId(), dtmfInfo);
1078 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1079 EXPECT_EQ(SUCCESS, ret);
1080 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SEND_DTMF));
1081 }
1082
1083 /**
1084 * @tc.number Telephony_DriverSystem_SendDtmf_V1_0200
1085 * @tc.name Send dtmf
1086 * @tc.desc Function test
1087 */
1088 HWTEST_F(RilCallTest, Telephony_DriverSystem_SendDtmf_V1_0200, Function | MediumTest | Level3)
1089 {
1090 if (!RilTestUtil::IsReady(SLOTID_2)) {
1091 return;
1092 }
1093 DtmfInfo dtmfInfo = {};
1094 dtmfInfo.callId = 0;
1095 dtmfInfo.dtmfKey = "#";
1096 dtmfInfo.onLength = 1;
1097 dtmfInfo.offLength = 0;
1098 dtmfInfo.stringLength = 1;
1099 int32_t ret = g_rilInterface->SendDtmf(SLOTID_2, RilTestUtil::GetSerialId(), dtmfInfo);
1100 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1101 EXPECT_EQ(SUCCESS, ret);
1102 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SEND_DTMF));
1103 }
1104
1105 /**
1106 * @tc.number Telephony_DriverSystem_StartDtmf_V1_0100
1107 * @tc.name Start dtmf
1108 * @tc.desc Function test
1109 */
1110 HWTEST_F(RilCallTest, Telephony_DriverSystem_StartDtmf_V1_0100, Function | MediumTest | Level3)
1111 {
1112 if (!RilTestUtil::IsReady(SLOTID_1)) {
1113 return;
1114 }
1115 DtmfInfo dtmfInfo = {};
1116 dtmfInfo.callId = 0;
1117 dtmfInfo.dtmfKey = "#";
1118 int32_t ret = g_rilInterface->StartDtmf(SLOTID_1, RilTestUtil::GetSerialId(), dtmfInfo);
1119 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1120 EXPECT_EQ(SUCCESS, ret);
1121 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_START_DTMF));
1122 }
1123
1124 /**
1125 * @tc.number Telephony_DriverSystem_StartDtmf_V1_0200
1126 * @tc.name Start dtmf
1127 * @tc.desc Function test
1128 */
1129 HWTEST_F(RilCallTest, Telephony_DriverSystem_StartDtmf_V1_0200, Function | MediumTest | Level3)
1130 {
1131 if (!RilTestUtil::IsReady(SLOTID_2)) {
1132 return;
1133 }
1134 DtmfInfo dtmfInfo = {};
1135 dtmfInfo.callId = 0;
1136 dtmfInfo.dtmfKey = "#";
1137 int32_t ret = g_rilInterface->StartDtmf(SLOTID_2, RilTestUtil::GetSerialId(), dtmfInfo);
1138 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1139 EXPECT_EQ(SUCCESS, ret);
1140 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_START_DTMF));
1141 }
1142
1143 /**
1144 * @tc.number Telephony_DriverSystem_StopDtmf_V1_0100
1145 * @tc.name Stop dtmf
1146 * @tc.desc Function test
1147 */
1148 HWTEST_F(RilCallTest, Telephony_DriverSystem_StopDtmf_V1_0100, Function | MediumTest | Level3)
1149 {
1150 if (!RilTestUtil::IsReady(SLOTID_1)) {
1151 return;
1152 }
1153 DtmfInfo dtmfInfo = {};
1154 dtmfInfo.callId = 0;
1155 dtmfInfo.dtmfKey = "#";
1156 int32_t ret = g_rilInterface->StopDtmf(SLOTID_1, RilTestUtil::GetSerialId(), dtmfInfo);
1157 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1158 EXPECT_EQ(SUCCESS, ret);
1159 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_STOP_DTMF));
1160 }
1161
1162 /**
1163 * @tc.number Telephony_DriverSystem_StopDtmf_V1_0200
1164 * @tc.name Stop dtmf
1165 * @tc.desc Function test
1166 */
1167 HWTEST_F(RilCallTest, Telephony_DriverSystem_StopDtmf_V1_0200, Function | MediumTest | Level3)
1168 {
1169 if (!RilTestUtil::IsReady(SLOTID_2)) {
1170 return;
1171 }
1172 DtmfInfo dtmfInfo = {};
1173 dtmfInfo.callId = 0;
1174 dtmfInfo.dtmfKey = "#";
1175 int32_t ret = g_rilInterface->StopDtmf(SLOTID_2, RilTestUtil::GetSerialId(), dtmfInfo);
1176 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1177 EXPECT_EQ(SUCCESS, ret);
1178 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_STOP_DTMF));
1179 }
1180
1181 /**
1182 * @tc.number Telephony_DriverSystem_SetBarringPassword_V1_0100
1183 * @tc.name Set barring password
1184 * @tc.desc Function test
1185 */
1186 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetBarringPassword_V1_0100, Function | MediumTest | Level3)
1187 {
1188 if (!RilTestUtil::IsReady(SLOTID_1)) {
1189 return;
1190 }
1191 SetBarringInfo setBarringInfo = {};
1192 setBarringInfo.fac = "AB";
1193 setBarringInfo.oldPassword = "1234";
1194 setBarringInfo.newPassword = "2345";
1195 int32_t ret = g_rilInterface->SetBarringPassword(SLOTID_1, RilTestUtil::GetSerialId(), setBarringInfo);
1196 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1197 EXPECT_EQ(SUCCESS, ret);
1198 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_BARRING_PASSWORD));
1199 }
1200
1201 /**
1202 * @tc.number Telephony_DriverSystem_SetBarringPassword_V1_0200
1203 * @tc.name Set barring password
1204 * @tc.desc Function test
1205 */
1206 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetBarringPassword_V1_0200, Function | MediumTest | Level3)
1207 {
1208 if (!RilTestUtil::IsReady(SLOTID_2)) {
1209 return;
1210 }
1211 SetBarringInfo setBarringInfo = {};
1212 setBarringInfo.fac = "AB";
1213 setBarringInfo.oldPassword = "1234";
1214 setBarringInfo.newPassword = "2345";
1215 int32_t ret = g_rilInterface->SetBarringPassword(SLOTID_2, RilTestUtil::GetSerialId(), setBarringInfo);
1216 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1217 EXPECT_EQ(SUCCESS, ret);
1218 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_SET_BARRING_PASSWORD));
1219 }
1220
1221 /**
1222 * @tc.number Telephony_DriverSystem_CloseUnFinishedUssd_V1_0100
1223 * @tc.name Set barring password
1224 * @tc.desc Function test
1225 */
1226 HWTEST_F(RilCallTest, Telephony_DriverSystem_CloseUnFinishedUssd_V1_0100, Function | MediumTest | Level3)
1227 {
1228 if (!RilTestUtil::IsReady(SLOTID_1)) {
1229 return;
1230 }
1231 int32_t ret = g_rilInterface->CloseUnFinishedUssd(SLOTID_1, RilTestUtil::GetSerialId());
1232 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1233 EXPECT_EQ(SUCCESS, ret);
1234 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_CLOSE_UNFINISHED_USSD));
1235 }
1236
1237 /**
1238 * @tc.number Telephony_DriverSystem_CloseUnFinishedUssd_V1_0200
1239 * @tc.name Set barring password
1240 * @tc.desc Function test
1241 */
1242 HWTEST_F(RilCallTest, Telephony_DriverSystem_CloseUnFinishedUssd_V1_0200, Function | MediumTest | Level3)
1243 {
1244 if (!RilTestUtil::IsReady(SLOTID_2)) {
1245 return;
1246 }
1247 int32_t ret = g_rilInterface->CloseUnFinishedUssd(SLOTID_2, RilTestUtil::GetSerialId());
1248 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1249 EXPECT_EQ(SUCCESS, ret);
1250 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_CLOSE_UNFINISHED_USSD));
1251 }
1252
1253 /**
1254 * @tc.number Telephony_DriverSystem_SetVonrSwitch_V1_0100
1255 * @tc.name Set vonr switch
1256 * @tc.desc Function test
1257 */
1258 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetVonrSwitch_V1_0100, Function | MediumTest | Level3)
1259 {
1260 if (!RilTestUtil::IsReady(SLOTID_1)) {
1261 return;
1262 }
1263 int32_t ret = g_rilInterface->SetVonrSwitch(SLOTID_1, RilTestUtil::GetSerialId(), 0);
1264 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1265 EXPECT_EQ(SUCCESS, ret);
1266 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_SET_VONR_SWITCH));
1267 }
1268
1269 /**
1270 * @tc.number Telephony_DriverSystem_SetVonrSwitch_V1_0200
1271 * @tc.name Set vonr switch
1272 * @tc.desc Function test
1273 */
1274 HWTEST_F(RilCallTest, Telephony_DriverSystem_SetVonrSwitch_V1_0200, Function | MediumTest | Level3)
1275 {
1276 if (!RilTestUtil::IsReady(SLOTID_2)) {
1277 return;
1278 }
1279 int32_t ret = g_rilInterface->SetVonrSwitch(SLOTID_2, RilTestUtil::GetSerialId(), 0);
1280 RilTestUtil::WaitFor(WAIT_TIME_SECOND);
1281 EXPECT_EQ(SUCCESS, ret);
1282 ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_SET_VONR_SWITCH));
1283 }
1284 } // namespace Telephony
1285 } // namespace OHOS