• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 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 "distributed_radar_test.h"
17 
18 using namespace testing;
19 using namespace testing::ext;
20 
21 namespace OHOS {
22 namespace DistributedSchedule {
23 
24 namespace {
25     const std::string DEVICE_ID = "DeviceId";
26     const std::string BUNDLE_NAME = "BundleName";
27     constexpr size_t SIZE = 12;
28 }
29 
SetUpTestCase()30 void DistributedRadarTest::SetUpTestCase()
31 {
32     DTEST_LOG << "DistributedRadarTest::SetUpTestCase" << std::endl;
33 }
34 
TearDownTestCase()35 void DistributedRadarTest::TearDownTestCase()
36 {
37     DTEST_LOG << "DistributedRadarTest::TearDownTestCase" << std::endl;
38 }
39 
TearDown()40 void DistributedRadarTest::TearDown()
41 {
42     DTEST_LOG << "DistributedRadarTest::TearDown" << std::endl;
43 }
44 
SetUp()45 void DistributedRadarTest::SetUp()
46 {
47     DTEST_LOG << "DistributedRadarTest::SetUp" << std::endl;
48 }
49 
50 /**
51  * @tc.name: RegisterSoftbusCallbackRes_001
52  * @tc.desc: check RegisterSoftbusCallbackRes
53  * @tc.type: FUNC
54  */
55 HWTEST_F(DistributedRadarTest, RegisterSoftbusCallbackRes_001, TestSize.Level3)
56 {
57     DTEST_LOG << "DistributedRadarTest RegisterSoftbusCallbackRes_001 begin" << std::endl;
58     bool ret = DmsRadar::GetInstance().RegisterSoftbusCallbackRes(FUNC, ERR_OK);
59     EXPECT_EQ(ret, true);
60     DTEST_LOG << "DistributedRadarTest RegisterSoftbusCallbackRes_001 end" << std::endl;
61 }
62 
63 /**
64  * @tc.name: RegisterSoftbusCallbackRes_002
65  * @tc.desc: check RegisterSoftbusCallbackRes
66  * @tc.type: FUNC
67  */
68 HWTEST_F(DistributedRadarTest, RegisterSoftbusCallbackRes_002, TestSize.Level3)
69 {
70     DTEST_LOG << "DistributedRadarTest RegisterSoftbusCallbackRes_002 begin" << std::endl;
71     bool ret = DmsRadar::GetInstance().RegisterSoftbusCallbackRes(FUNC, ERR_NO);
72     EXPECT_EQ(ret, true);
73     DTEST_LOG << "DistributedRadarTest RegisterSoftbusCallbackRes_002 end" << std::endl;
74 }
75 
76 /**
77  * @tc.name: RegisterFocusedRes_001
78  * @tc.desc: check RegisterFocusedRes
79  * @tc.type: FUNC
80  */
81 HWTEST_F(DistributedRadarTest, RegisterFocusedRes_001, TestSize.Level3)
82 {
83     DTEST_LOG << "DistributedRadarTest RegisterFocusedRes_001 begin" << std::endl;
84     bool ret = DmsRadar::GetInstance().RegisterFocusedRes(FUNC, ERR_OK);
85     EXPECT_EQ(ret, true);
86     DTEST_LOG << "DistributedRadarTest RegisterFocusedRes_001 end" << std::endl;
87 }
88 
89 /**
90  * @tc.name: RegisterFocusedRes_002
91  * @tc.desc: check RegisterFocusedRes
92  * @tc.type: FUNC
93  */
94 HWTEST_F(DistributedRadarTest, RegisterFocusedRes_002, TestSize.Level3)
95 {
96     DTEST_LOG << "DistributedRadarTest RegisterFocusedRes_002 begin" << std::endl;
97     bool ret = DmsRadar::GetInstance().RegisterFocusedRes(FUNC, ERR_NO);
98     EXPECT_EQ(ret, true);
99     DTEST_LOG << "DistributedRadarTest RegisterFocusedRes_002 end" << std::endl;
100 }
101 
102 /**
103  * @tc.name: DmsFocused_001
104  * @tc.desc: check DmsFocused
105  * @tc.type: FUNC
106  */
107 HWTEST_F(DistributedRadarTest, DmsFocused_001, TestSize.Level3)
108 {
109     DTEST_LOG << "DistributedRadarTest DmsFocused_001 begin" << std::endl;
110     bool ret = DmsRadar::GetInstance().DmsFocused(FUNC, NORMAL);
111     EXPECT_EQ(ret, true);
112     DTEST_LOG << "DistributedRadarTest DmsFocused_001 end" << std::endl;
113 }
114 
115 /**
116  * @tc.name: NormalFocusedSendEventRes_001
117  * @tc.desc: check NormalFocusedSendEventRes
118  * @tc.type: FUNC
119  */
120 HWTEST_F(DistributedRadarTest, NormalFocusedSendEventRes_001, TestSize.Level3)
121 {
122     DTEST_LOG << "DistributedRadarTest NormalFocusedSendEventRes_001 begin" << std::endl;
123     bool ret = DmsRadar::GetInstance().NormalFocusedSendEventRes(FUNC, ERR_OK);
124     EXPECT_EQ(ret, true);
125     DTEST_LOG << "DistributedRadarTest NormalFocusedSendEventRes_001 end" << std::endl;
126 }
127 
128 /**
129  * @tc.name: NormalFocusedSendEventRes_002
130  * @tc.desc: check NormalFocusedSendEventRes
131  * @tc.type: FUNC
132  */
133 HWTEST_F(DistributedRadarTest, NormalFocusedSendEventRes_002, TestSize.Level3)
134 {
135     DTEST_LOG << "DistributedRadarTest NormalFocusedSendEventRes_002 begin" << std::endl;
136     bool ret = DmsRadar::GetInstance().NormalFocusedSendEventRes(FUNC, ERR_NO);
137     EXPECT_EQ(ret, true);
138     DTEST_LOG << "DistributedRadarTest NormalFocusedSendEventRes_002 end" << std::endl;
139 }
140 
141 /**
142  * @tc.name: SetFocusedState_001
143  * @tc.desc: check SetFocusedState
144  * @tc.type: FUNC
145  */
146 HWTEST_F(DistributedRadarTest, SetFocusedState_001, TestSize.Level3)
147 {
148     DTEST_LOG << "DistributedRadarTest SetFocusedState_001 begin" << std::endl;
149     bool ret = DmsRadar::GetInstance().SetFocusedState(FUNC);
150     EXPECT_EQ(ret, true);
151     DTEST_LOG << "DistributedRadarTest SetFocusedState_001 end" << std::endl;
152 }
153 
154 /**
155  * @tc.name: ChangeStateFocusedGetAccessTokenIdRes_001
156  * @tc.desc: check ChangeStateFocusedGetAccessTokenIdRes
157  * @tc.type: FUNC
158  */
159 HWTEST_F(DistributedRadarTest, ChangeStateFocusedGetAccessTokenIdRes_001, TestSize.Level3)
160 {
161     DTEST_LOG << "DistributedRadarTest ChangeStateFocusedGetAccessTokenIdRes_001 begin" << std::endl;
162     bool ret = DmsRadar::GetInstance().ChangeStateFocusedGetAccessTokenIdRes(FUNC, ERR_OK);
163     EXPECT_EQ(ret, true);
164     DTEST_LOG << "DistributedRadarTest ChangeStateFocusedGetAccessTokenIdRes_001 end" << std::endl;
165 }
166 
167 /**
168  * @tc.name: ChangeStateFocusedGetAccessTokenIdRes_002
169  * @tc.desc: check ChangeStateFocusedGetAccessTokenIdRes
170  * @tc.type: FUNC
171  */
172 HWTEST_F(DistributedRadarTest, ChangeStateFocusedGetAccessTokenIdRes_002, TestSize.Level3)
173 {
174     DTEST_LOG << "DistributedRadarTest ChangeStateFocusedGetAccessTokenIdRes_002 begin" << std::endl;
175     bool ret = DmsRadar::GetInstance().ChangeStateFocusedGetAccessTokenIdRes(FUNC, ERR_NO);
176     EXPECT_EQ(ret, true);
177     DTEST_LOG << "DistributedRadarTest ChangeStateFocusedGetAccessTokenIdRes_002 end" << std::endl;
178 }
179 
180 /**
181  * @tc.name: ChangeStateFocusedSendEventRes_001
182  * @tc.desc: check ChangeStateFocusedSendEventRes
183  * @tc.type: FUNC
184  */
185 HWTEST_F(DistributedRadarTest, ChangeStateFocusedSendEventRes_001, TestSize.Level3)
186 {
187     DTEST_LOG << "DistributedRadarTest ChangeStateFocusedSendEventRes_001 begin" << std::endl;
188     bool ret = DmsRadar::GetInstance().ChangeStateFocusedSendEventRes(FUNC, ERR_OK);
189     EXPECT_EQ(ret, true);
190     DTEST_LOG << "DistributedRadarTest ChangeStateFocusedSendEventRes_001 end" << std::endl;
191 }
192 
193 /**
194  * @tc.name: ChangeStateFocusedSendEventRes_002
195  * @tc.desc: check ChangeStateFocusedSendEventRes
196  * @tc.type: FUNC
197  */
198 HWTEST_F(DistributedRadarTest, ChangeStateFocusedSendEventRes_002, TestSize.Level3)
199 {
200     DTEST_LOG << "DistributedRadarTest ChangeStateFocusedSendEventRes_002 begin" << std::endl;
201     bool ret = DmsRadar::GetInstance().ChangeStateFocusedSendEventRes(FUNC, ERR_NO);
202     EXPECT_EQ(ret, true);
203     DTEST_LOG << "DistributedRadarTest ChangeStateFocusedSendEventRes_002 end" << std::endl;
204 }
205 
206 /**
207  * @tc.name: DmsUnfocused_001
208  * @tc.desc: check DmsUnfocused
209  * @tc.type: FUNC
210  */
211 HWTEST_F(DistributedRadarTest, DmsUnfocused_001, TestSize.Level3)
212 {
213     DTEST_LOG << "DistributedRadarTest DmsUnfocused_001 begin" << std::endl;
214     bool ret = DmsRadar::GetInstance().DmsUnfocused(FUNC);
215     EXPECT_EQ(ret, true);
216     DTEST_LOG << "DistributedRadarTest DmsUnfocused_001 end" << std::endl;
217 }
218 
219 /**
220  * @tc.name: NormalUnfocusedGetAccessTokenIdRes_001
221  * @tc.desc: check NormalUnfocusedGetAccessTokenIdRes
222  * @tc.type: FUNC
223  */
224 HWTEST_F(DistributedRadarTest, NormalUnfocusedGetAccessTokenIdRes_001, TestSize.Level3)
225 {
226     DTEST_LOG << "DistributedRadarTest NormalUnfocusedGetAccessTokenIdRes_001 begin" << std::endl;
227     bool ret = DmsRadar::GetInstance().NormalUnfocusedGetAccessTokenIdRes(FUNC, ERR_OK);
228     EXPECT_EQ(ret, true);
229     DTEST_LOG << "DistributedRadarTest NormalUnfocusedGetAccessTokenIdRes_001 end" << std::endl;
230 }
231 
232 /**
233  * @tc.name: NormalUnfocusedGetAccessTokenIdRes_002
234  * @tc.desc: check NormalUnfocusedGetAccessTokenIdRes
235  * @tc.type: FUNC
236  */
237 HWTEST_F(DistributedRadarTest, NormalUnfocusedGetAccessTokenIdRes_002, TestSize.Level3)
238 {
239     DTEST_LOG << "DistributedRadarTest NormalUnfocusedGetAccessTokenIdRes_002 begin" << std::endl;
240     bool ret = DmsRadar::GetInstance().NormalUnfocusedGetAccessTokenIdRes(FUNC, ERR_NO);
241     EXPECT_EQ(ret, true);
242     DTEST_LOG << "DistributedRadarTest NormalUnfocusedGetAccessTokenIdRes_002 end" << std::endl;
243 }
244 
245 /**
246  * @tc.name: NormalUnfocusedSendEventRes_001
247  * @tc.desc: check NormalUnfocusedSendEventRes
248  * @tc.type: FUNC
249  */
250 HWTEST_F(DistributedRadarTest, NormalUnfocusedSendEventRes_001, TestSize.Level3)
251 {
252     DTEST_LOG << "DistributedRadarTest NormalUnfocusedSendEventRes_001 begin" << std::endl;
253     bool ret = DmsRadar::GetInstance().NormalUnfocusedSendEventRes(FUNC, ERR_OK);
254     EXPECT_EQ(ret, true);
255     DTEST_LOG << "DistributedRadarTest NormalUnfocusedSendEventRes_001 end" << std::endl;
256 }
257 
258 /**
259  * @tc.name: NormalUnfocusedSendEventRes_002
260  * @tc.desc: check NormalUnfocusedSendEventRes
261  * @tc.type: FUNC
262  */
263 HWTEST_F(DistributedRadarTest, NormalUnfocusedSendEventRes_002, TestSize.Level3)
264 {
265     DTEST_LOG << "DistributedRadarTest NormalUnfocusedSendEventRes_002 begin" << std::endl;
266     bool ret = DmsRadar::GetInstance().NormalUnfocusedSendEventRes(FUNC, ERR_NO);
267     EXPECT_EQ(ret, true);
268     DTEST_LOG << "DistributedRadarTest NormalUnfocusedSendEventRes_002 end" << std::endl;
269 }
270 
271 /**
272  * @tc.name: RecordTime_001
273  * @tc.desc: check RecordTime
274  * @tc.type: FUNC
275  */
276 HWTEST_F(DistributedRadarTest, RecordTime_001, TestSize.Level3)
277 {
278     DTEST_LOG << "DistributedRadarTest RecordTime_001 begin" << std::endl;
279     bool ret = DmsRadar::GetInstance().RecordTime(FUNC);
280     EXPECT_EQ(ret, true);
281     DTEST_LOG << "DistributedRadarTest RecordTime_001 end" << std::endl;
282 }
283 
284 /**
285  * @tc.name: MultimodeUnfocusedGetAccessTokenIdRes_001
286  * @tc.desc: check MultimodeUnfocusedGetAccessTokenIdRes
287  * @tc.type: FUNC
288  */
289 HWTEST_F(DistributedRadarTest, MultimodeUnfocusedGetAccessTokenIdRes_001, TestSize.Level3)
290 {
291     DTEST_LOG << "DistributedRadarTest MultimodeUnfocusedGetAccessTokenIdRes_001 begin" << std::endl;
292     bool ret = DmsRadar::GetInstance().MultimodeUnfocusedGetAccessTokenIdRes(FUNC, ERR_OK);
293     EXPECT_EQ(ret, true);
294     DTEST_LOG << "DistributedRadarTest MultimodeUnfocusedGetAccessTokenIdRes_001 end" << std::endl;
295 }
296 
297 /**
298  * @tc.name: MultimodeUnfocusedGetAccessTokenIdRes_002
299  * @tc.desc: check MultimodeUnfocusedGetAccessTokenIdRes
300  * @tc.type: FUNC
301  */
302 HWTEST_F(DistributedRadarTest, MultimodeUnfocusedGetAccessTokenIdRes_002, TestSize.Level3)
303 {
304     DTEST_LOG << "DistributedRadarTest MultimodeUnfocusedGetAccessTokenIdRes_002 begin" << std::endl;
305     bool ret = DmsRadar::GetInstance().MultimodeUnfocusedGetAccessTokenIdRes(FUNC, ERR_NO);
306     EXPECT_EQ(ret, true);
307     DTEST_LOG << "DistributedRadarTest MultimodeUnfocusedGetAccessTokenIdRes_002 end" << std::endl;
308 }
309 
310 /**
311  * @tc.name: MultimodeUnfocusedSendEventRes_001
312  * @tc.desc: check MultimodeUnfocusedSendEventRes
313  * @tc.type: FUNC
314  */
315 HWTEST_F(DistributedRadarTest, MultimodeUnfocusedSendEventRes_001, TestSize.Level3)
316 {
317     DTEST_LOG << "DistributedRadarTest MultimodeUnfocusedSendEventRes_001 begin" << std::endl;
318     bool ret = DmsRadar::GetInstance().MultimodeUnfocusedSendEventRes(FUNC, ERR_OK);
319     EXPECT_EQ(ret, true);
320     DTEST_LOG << "DistributedRadarTest MultimodeUnfocusedSendEventRes_001 end" << std::endl;
321 }
322 
323 /**
324  * @tc.name: MultimodeUnfocusedSendEventRes_002
325  * @tc.desc: check MultimodeUnfocusedSendEventRes
326  * @tc.type: FUNC
327  */
328 HWTEST_F(DistributedRadarTest, MultimodeUnfocusedSendEventRes_002, TestSize.Level3)
329 {
330     DTEST_LOG << "DistributedRadarTest MultimodeUnfocusedSendEventRes_002 begin" << std::endl;
331     bool ret = DmsRadar::GetInstance().MultimodeUnfocusedSendEventRes(FUNC, ERR_NO);
332     EXPECT_EQ(ret, true);
333     DTEST_LOG << "DistributedRadarTest MultimodeUnfocusedSendEventRes_002 end" << std::endl;
334 }
335 
336 /**
337  * @tc.name: SetUnfocusedState_001
338  * @tc.desc: check SetUnfocusedState
339  * @tc.type: FUNC
340  */
341 HWTEST_F(DistributedRadarTest, SetUnfocusedState_001, TestSize.Level3)
342 {
343     DTEST_LOG << "DistributedRadarTest SetUnfocusedState_001 begin" << std::endl;
344     bool ret = DmsRadar::GetInstance().SetUnfocusedState(FUNC);
345     EXPECT_EQ(ret, true);
346     DTEST_LOG << "DistributedRadarTest SetUnfocusedState_001 end" << std::endl;
347 }
348 
349 /**
350  * @tc.name: ChangeStateUnfocusedGetAccessTokenIdRes_001
351  * @tc.desc: check ChangeStateUnfocusedGetAccessTokenIdRes
352  * @tc.type: FUNC
353  */
354 HWTEST_F(DistributedRadarTest, ChangeStateUnfocusedGetAccessTokenIdRes_001, TestSize.Level3)
355 {
356     DTEST_LOG << "DistributedRadarTest ChangeStateUnfocusedGetAccessTokenIdRes_001 begin" << std::endl;
357     bool ret = DmsRadar::GetInstance().ChangeStateUnfocusedGetAccessTokenIdRes(FUNC, ERR_OK);
358     EXPECT_EQ(ret, true);
359     DTEST_LOG << "DistributedRadarTest ChangeStateUnfocusedGetAccessTokenIdRes_001 end" << std::endl;
360 }
361 
362 /**
363  * @tc.name: ChangeStateUnfocusedGetAccessTokenIdRes_002
364  * @tc.desc: check ChangeStateUnfocusedGetAccessTokenIdRes
365  * @tc.type: FUNC
366  */
367 HWTEST_F(DistributedRadarTest, ChangeStateUnfocusedGetAccessTokenIdRes_002, TestSize.Level3)
368 {
369     DTEST_LOG << "DistributedRadarTest ChangeStateUnfocusedGetAccessTokenIdRes_002 begin" << std::endl;
370     bool ret = DmsRadar::GetInstance().ChangeStateUnfocusedGetAccessTokenIdRes(FUNC, ERR_NO);
371     EXPECT_EQ(ret, true);
372     DTEST_LOG << "DistributedRadarTest ChangeStateUnfocusedGetAccessTokenIdRes_002 end" << std::endl;
373 }
374 
375 /**
376  * @tc.name: ChangeStateUnfocusedSendEventRes_001
377  * @tc.desc: check ChangeStateUnfocusedSendEventRes
378  * @tc.type: FUNC
379  */
380 HWTEST_F(DistributedRadarTest, ChangeStateUnfocusedSendEventRes_001, TestSize.Level3)
381 {
382     DTEST_LOG << "DistributedRadarTest ChangeStateUnfocusedSendEventRes_001 begin" << std::endl;
383     bool ret = DmsRadar::GetInstance().ChangeStateUnfocusedSendEventRes(FUNC, ERR_OK);
384     EXPECT_EQ(ret, true);
385     DTEST_LOG << "DistributedRadarTest ChangeStateUnfocusedSendEventRes_001 end" << std::endl;
386 }
387 
388 /**
389  * @tc.name: ChangeStateUnfocusedSendEventRes_002
390  * @tc.desc: check ChangeStateUnfocusedSendEventRes
391  * @tc.type: FUNC
392  */
393 HWTEST_F(DistributedRadarTest, ChangeStateUnfocusedSendEventRes_002, TestSize.Level3)
394 {
395     DTEST_LOG << "DistributedRadarTest ChangeStateUnfocusedSendEventRes_002 begin" << std::endl;
396     bool ret = DmsRadar::GetInstance().ChangeStateUnfocusedSendEventRes(FUNC, ERR_NO);
397     EXPECT_EQ(ret, true);
398     DTEST_LOG << "DistributedRadarTest ChangeStateUnfocusedSendEventRes_002 end" << std::endl;
399 }
400 
401 /**
402  * @tc.name: RecvFocused_001
403  * @tc.desc: check RecvFocused
404  * @tc.type: FUNC
405  */
406 HWTEST_F(DistributedRadarTest, RecvFocused_001, TestSize.Level3)
407 {
408     DTEST_LOG << "DistributedRadarTest RecvFocused_001 begin" << std::endl;
409     bool ret = DmsRadar::GetInstance().RecvFocused(FUNC);
410     EXPECT_EQ(ret, true);
411     DTEST_LOG << "DistributedRadarTest RecvFocused_001 end" << std::endl;
412 }
413 
414 /**
415  * @tc.name: FocusedGetBundleName_001
416  * @tc.desc: check FocusedGetBundleName
417  * @tc.type: FUNC
418  */
419 HWTEST_F(DistributedRadarTest, FocusedGetBundleName_001, TestSize.Level3)
420 {
421     DTEST_LOG << "DistributedRadarTest FocusedGetBundleName_001 begin" << std::endl;
422     bool ret = DmsRadar::GetInstance().FocusedGetBundleName(FUNC, ERR_OK);
423     EXPECT_EQ(ret, true);
424     DTEST_LOG << "DistributedRadarTest FocusedGetBundleName_001 end" << std::endl;
425 }
426 
427 /**
428  * @tc.name: FocusedGetBundleName_002
429  * @tc.desc: check FocusedGetBundleName
430  * @tc.type: FUNC
431  */
432 HWTEST_F(DistributedRadarTest, FocusedGetBundleName_002, TestSize.Level3)
433 {
434     DTEST_LOG << "DistributedRadarTest FocusedGetBundleName_002 begin" << std::endl;
435     bool ret = DmsRadar::GetInstance().FocusedGetBundleName(FUNC, ERR_NO);
436     EXPECT_EQ(ret, true);
437     DTEST_LOG << "DistributedRadarTest FocusedGetBundleName_002 end" << std::endl;
438 }
439 
440 /**
441  * @tc.name: NotifyDockFocused_001
442  * @tc.desc: check NotifyDockFocused
443  * @tc.type: FUNC
444  */
445 HWTEST_F(DistributedRadarTest, NotifyDockFocused_001, TestSize.Level3)
446 {
447     DTEST_LOG << "DistributedRadarTest NotifyDockFocused_001 begin" << std::endl;
448     bool ret = DmsRadar::GetInstance().NotifyDockFocused(FUNC, ERR_OK);
449     EXPECT_EQ(ret, true);
450     DTEST_LOG << "DistributedRadarTest NotifyDockFocused_001 end" << std::endl;
451 }
452 
453 /**
454  * @tc.name: NotifyDockFocused_002
455  * @tc.desc: check NotifyDockFocused
456  * @tc.type: FUNC
457  */
458 HWTEST_F(DistributedRadarTest, NotifyDockFocused_002, TestSize.Level3)
459 {
460     DTEST_LOG << "DistributedRadarTest NotifyDockFocused_002 begin" << std::endl;
461     bool ret = DmsRadar::GetInstance().NotifyDockFocused(FUNC, ERR_NO);
462     EXPECT_EQ(ret, true);
463     DTEST_LOG << "DistributedRadarTest NotifyDockFocused_002 end" << std::endl;
464 }
465 
466 /**
467  * @tc.name: RecvUnfocused_001
468  * @tc.desc: check RecvUnfocused
469  * @tc.type: FUNC
470  */
471 HWTEST_F(DistributedRadarTest, RecvUnfocused_001, TestSize.Level3)
472 {
473     DTEST_LOG << "DistributedRadarTest RecvUnfocused_001 begin" << std::endl;
474     bool ret = DmsRadar::GetInstance().RecvUnfocused(FUNC);
475     EXPECT_EQ(ret, true);
476     DTEST_LOG << "DistributedRadarTest RecvUnfocused_001 end" << std::endl;
477 }
478 
479 /**
480  * @tc.name: UnfocusedGetBundleName_001
481  * @tc.desc: check UnfocusedGetBundleName
482  * @tc.type: FUNC
483  */
484 HWTEST_F(DistributedRadarTest, UnfocusedGetBundleName_001, TestSize.Level3)
485 {
486     DTEST_LOG << "DistributedRadarTest UnfocusedGetBundleName_001 begin" << std::endl;
487     bool ret = DmsRadar::GetInstance().UnfocusedGetBundleName(FUNC, ERR_OK);
488     EXPECT_EQ(ret, true);
489     DTEST_LOG << "DistributedRadarTest UnfocusedGetBundleName_001 end" << std::endl;
490 }
491 
492 /**
493  * @tc.name: UnfocusedGetBundleName_002
494  * @tc.desc: check UnfocusedGetBundleName
495  * @tc.type: FUNC
496  */
497 HWTEST_F(DistributedRadarTest, UnfocusedGetBundleName_002, TestSize.Level3)
498 {
499     DTEST_LOG << "DistributedRadarTest UnfocusedGetBundleName_002 begin" << std::endl;
500     bool ret = DmsRadar::GetInstance().UnfocusedGetBundleName(FUNC, ERR_NO);
501     EXPECT_EQ(ret, true);
502     DTEST_LOG << "DistributedRadarTest UnfocusedGetBundleName_002 end" << std::endl;
503 }
504 
505 /**
506  * @tc.name: NotifyDockUnfocused_001
507  * @tc.desc: check NotifyDockUnfocused
508  * @tc.type: FUNC
509  */
510 HWTEST_F(DistributedRadarTest, NotifyDockUnfocused_001, TestSize.Level3)
511 {
512     DTEST_LOG << "DistributedRadarTest NotifyDockUnfocused_001 begin" << std::endl;
513     bool ret = DmsRadar::GetInstance().NotifyDockUnfocused(FUNC, ERR_OK);
514     EXPECT_EQ(ret, true);
515     DTEST_LOG << "DistributedRadarTest NotifyDockUnfocused_001 end" << std::endl;
516 }
517 
518 /**
519  * @tc.name: NotifyDockUnfocused_002
520  * @tc.desc: check NotifyDockUnfocused
521  * @tc.type: FUNC
522  */
523 HWTEST_F(DistributedRadarTest, NotifyDockUnfocused_002, TestSize.Level3)
524 {
525     DTEST_LOG << "DistributedRadarTest NotifyDockUnfocused_002 begin" << std::endl;
526     bool ret = DmsRadar::GetInstance().NotifyDockUnfocused(FUNC, ERR_NO);
527     EXPECT_EQ(ret, true);
528     DTEST_LOG << "DistributedRadarTest NotifyDockUnfocused_002 end" << std::endl;
529 }
530 
531 /**
532  * @tc.name: ClickIconDmsContinue_001
533  * @tc.desc: check ClickIconDmsContinue
534  * @tc.type: FUNC
535  */
536 HWTEST_F(DistributedRadarTest, ClickIconDmsContinue_001, TestSize.Level3)
537 {
538     DTEST_LOG << "DistributedRadarTest ClickIconDmsContinue_001 begin" << std::endl;
539     bool ret = DmsRadar::GetInstance().ClickIconDmsContinue(FUNC, ERR_OK, DEVICE_ID, BUNDLE_NAME, BUNDLE_NAME);
540     EXPECT_EQ(ret, true);
541     DTEST_LOG << "DistributedRadarTest ClickIconDmsContinue_001 end" << std::endl;
542 }
543 
544 /**
545  * @tc.name: ClickIconDmsContinue_002
546  * @tc.desc: check ClickIconDmsContinue
547  * @tc.type: FUNC
548  */
549 HWTEST_F(DistributedRadarTest, ClickIconDmsContinue_002, TestSize.Level3)
550 {
551     DTEST_LOG << "DistributedRadarTest ClickIconDmsContinue_002 begin" << std::endl;
552     bool ret = DmsRadar::GetInstance().ClickIconDmsContinue(FUNC, ERR_NO, DEVICE_ID, BUNDLE_NAME, BUNDLE_NAME);
553     EXPECT_EQ(ret, true);
554     DTEST_LOG << "DistributedRadarTest ClickIconDmsContinue_002 end" << std::endl;
555 }
556 
557 /**
558  * @tc.name: ClickIconDmsStartAbility_001
559  * @tc.desc: check ClickIconDmsStartAbility
560  * @tc.type: FUNC
561  */
562 HWTEST_F(DistributedRadarTest, ClickIconDmsStartAbility_001, TestSize.Level3)
563 {
564     DTEST_LOG << "DistributedRadarTest ClickIconDmsStartAbility_001 begin" << std::endl;
565     bool ret = DmsRadar::GetInstance().ClickIconDmsStartAbility(FUNC, ERR_OK);
566     EXPECT_EQ(ret, true);
567     DTEST_LOG << "DistributedRadarTest ClickIconDmsStartAbility_001 end" << std::endl;
568 }
569 
570 /**
571  * @tc.name: ClickIconDmsStartAbility_002
572  * @tc.desc: check ClickIconDmsStartAbility
573  * @tc.type: FUNC
574  */
575 HWTEST_F(DistributedRadarTest, ClickIconDmsStartAbility_002, TestSize.Level3)
576 {
577     DTEST_LOG << "DistributedRadarTest ClickIconDmsStartAbility_002 begin" << std::endl;
578     bool ret = DmsRadar::GetInstance().ClickIconDmsStartAbility(FUNC, ERR_NO);
579     EXPECT_EQ(ret, true);
580     DTEST_LOG << "DistributedRadarTest ClickIconDmsStartAbility_002 end" << std::endl;
581 }
582 
583 /**
584  * @tc.name: ClickIconDmsRecvOver_001
585  * @tc.desc: check ClickIconDmsRecvOver
586  * @tc.type: FUNC
587  */
588 HWTEST_F(DistributedRadarTest, ClickIconDmsRecvOver_001, TestSize.Level3)
589 {
590     DTEST_LOG << "DistributedRadarTest ClickIconDmsRecvOver_001 begin" << std::endl;
591     bool ret = DmsRadar::GetInstance().ClickIconDmsRecvOver(FUNC, ERR_OK);
592     EXPECT_EQ(ret, true);
593     DTEST_LOG << "DistributedRadarTest ClickIconDmsRecvOver_001 end" << std::endl;
594 }
595 
596 /**
597  * @tc.name: ClickIconDmsRecvOver_002
598  * @tc.desc: check ClickIconDmsRecvOver
599  * @tc.type: FUNC
600  */
601 HWTEST_F(DistributedRadarTest, ClickIconDmsRecvOver_002, TestSize.Level3)
602 {
603     DTEST_LOG << "DistributedRadarTest ClickIconDmsRecvOver_002 begin" << std::endl;
604     bool ret = DmsRadar::GetInstance().ClickIconDmsRecvOver(FUNC, ERR_NO);
605     EXPECT_EQ(ret, true);
606     DTEST_LOG << "DistributedRadarTest ClickIconDmsRecvOver_002 end" << std::endl;
607 }
608 
609 /**
610  * @tc.name: SaveDataDmsContinue_001
611  * @tc.desc: check SaveDataDmsContinue
612  * @tc.type: FUNC
613  */
614 HWTEST_F(DistributedRadarTest, SaveDataDmsContinue_001, TestSize.Level3)
615 {
616     DTEST_LOG << "DistributedRadarTest SaveDataDmsContinue_001 begin" << std::endl;
617     bool ret = DmsRadar::GetInstance().SaveDataDmsContinue(FUNC, ERR_OK);
618     EXPECT_EQ(ret, true);
619     DTEST_LOG << "DistributedRadarTest SaveDataDmsContinue_001 end" << std::endl;
620 }
621 
622 /**
623  * @tc.name: SaveDataDmsContinue_002
624  * @tc.desc: check SaveDataDmsContinue
625  * @tc.type: FUNC
626  */
627 HWTEST_F(DistributedRadarTest, SaveDataDmsContinue_002, TestSize.Level3)
628 {
629     DTEST_LOG << "DistributedRadarTest SaveDataDmsContinue_002 begin" << std::endl;
630     bool ret = DmsRadar::GetInstance().SaveDataDmsContinue(FUNC, ERR_NO);
631     EXPECT_EQ(ret, true);
632     DTEST_LOG << "DistributedRadarTest SaveDataDmsContinue_002 end" << std::endl;
633 }
634 
635 /**
636  * @tc.name: SaveDataDmsRemoteWant_001
637  * @tc.desc: check SaveDataDmsRemoteWant
638  * @tc.type: FUNC
639  */
640 HWTEST_F(DistributedRadarTest, SaveDataDmsRemoteWant_001, TestSize.Level3)
641 {
642     DTEST_LOG << "DistributedRadarTest SaveDataDmsRemoteWant_001 begin" << std::endl;
643     bool ret = DmsRadar::GetInstance().SaveDataDmsRemoteWant(FUNC, ERR_OK);
644     EXPECT_EQ(ret, true);
645     DTEST_LOG << "DistributedRadarTest SaveDataDmsRemoteWant_001 end" << std::endl;
646 }
647 
648 /**
649  * @tc.name: SaveDataDmsRemoteWant_002
650  * @tc.desc: check SaveDataDmsRemoteWant
651  * @tc.type: FUNC
652  */
653 HWTEST_F(DistributedRadarTest, SaveDataDmsRemoteWant_002, TestSize.Level3)
654 {
655     DTEST_LOG << "DistributedRadarTest SaveDataDmsRemoteWant_002 begin" << std::endl;
656     bool ret = DmsRadar::GetInstance().SaveDataDmsRemoteWant(FUNC, ERR_NO);
657     EXPECT_EQ(ret, true);
658     DTEST_LOG << "DistributedRadarTest SaveDataDmsRemoteWant_002 end" << std::endl;
659 }
660 
661 /**
662  * @tc.name: NormalFocusedGetAccessTokenIdRes_001
663  * @tc.desc: check NormalFocusedGetAccessTokenIdRes
664  * @tc.type: FUNC
665  */
666 HWTEST_F(DistributedRadarTest, NormalFocusedGetAccessTokenIdRes_001, TestSize.Level3)
667 {
668     DTEST_LOG << "DistributedRadarTest NormalFocusedGetAccessTokenIdRes_001 begin" << std::endl;
669     bool ret = DmsRadar::GetInstance().NormalFocusedGetAccessTokenIdRes(FUNC, ERR_NO);
670     EXPECT_EQ(ret, true);
671 
672     ret = DmsRadar::GetInstance().NormalFocusedGetAccessTokenIdRes(FUNC, ERR_OK);
673     EXPECT_EQ(ret, true);
674     DTEST_LOG << "DistributedRadarTest NormalFocusedGetAccessTokenIdRes_001 end" << std::endl;
675 }
676 
677 /**
678  * @tc.name: GetAnonyUdid_001
679  * @tc.desc: check GetAnonyUdid
680  * @tc.type: FUNC
681  */
682 HWTEST_F(DistributedRadarTest, GetAnonyUdid_001, TestSize.Level3)
683 {
684     DTEST_LOG << "DistributedRadarTest GetAnonyUdid_001 begin" << std::endl;
685     std::string udid;
686     std::string ret = DmsRadar::GetInstance().GetAnonyUdid(udid);
687     EXPECT_EQ(ret, "");
688 
689     udid = "***";
690     ret = DmsRadar::GetInstance().GetAnonyUdid(udid);
691     EXPECT_EQ(ret, "");
692 
693     std::string udid1(SIZE, '*');
694     ret = DmsRadar::GetInstance().GetAnonyUdid(udid1);
695     EXPECT_NE(ret, "");
696     DTEST_LOG << "DistributedRadarTest GetAnonyUdid_001 end" << std::endl;
697 }
698 }
699 }