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