• 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 <gtest/gtest.h>
17 #include <memory>
18 
19 #include "cloud_sync_service_proxy.h"
20 #include "dfs_error.h"
21 #include "i_cloud_download_callback_mock.h"
22 #include "i_cloud_sync_service_mock.h"
23 #include "service_callback_mock.h"
24 
25 namespace OHOS {
26 namespace FileManagement::CloudSync {
27 namespace Test {
28 using namespace testing::ext;
29 using namespace testing;
30 using namespace std;
31 
32 class CloudSyncServiceProxyTest : public testing::Test {
33 public:
34     static void SetUpTestCase(void);
35     static void TearDownTestCase(void);
36     void SetUp();
37     void TearDown();
38     shared_ptr<CloudSyncServiceProxy> proxy_ = nullptr;
39     sptr<CloudSyncServiceMock> mock_ = nullptr;
40     sptr<CloudSyncCallbackMock> remote_ = nullptr;
41     sptr<CloudDownloadCallbackMock> download_ = nullptr;
42 };
43 
SetUpTestCase(void)44 void CloudSyncServiceProxyTest::SetUpTestCase(void)
45 {
46     std::cout << "SetUpTestCase" << std::endl;
47 }
48 
TearDownTestCase(void)49 void CloudSyncServiceProxyTest::TearDownTestCase(void)
50 {
51     std::cout << "TearDownTestCase" << std::endl;
52 }
53 
SetUp(void)54 void CloudSyncServiceProxyTest::SetUp(void)
55 {
56     mock_ = sptr(new CloudSyncServiceMock());
57     proxy_ = make_shared<CloudSyncServiceProxy>(mock_);
58     remote_ = sptr(new CloudSyncCallbackMock());
59     download_ = sptr(new CloudDownloadCallbackMock());
60     std::cout << "SetUp" << std::endl;
61 }
62 
TearDown(void)63 void CloudSyncServiceProxyTest::TearDown(void)
64 {
65     proxy_ = nullptr;
66     mock_ = nullptr;
67     remote_ = nullptr;
68     std::cout << "TearDown" << std::endl;
69 }
70 
71 /**
72  * @tc.name: UnRegisterCallbackInner001
73  * @tc.desc: Verify the UnRegisterCallbackInner function.
74  * @tc.type: FUNC
75  * @tc.require: issueI7UYAL
76  */
77 HWTEST_F(CloudSyncServiceProxyTest, UnRegisterCallbackInner001, TestSize.Level1)
78 {
79     GTEST_LOG_(INFO) << "UnRegisterCallbackInner Start";
80     string bundleName = "com.ohos.photos";
81     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
82     int result = proxy_->UnRegisterCallbackInner(bundleName);
83     EXPECT_EQ(result, E_BROKEN_IPC);
84     GTEST_LOG_(INFO) << "UnRegisterCallbackInner End";
85 }
86 
87 /**
88  * @tc.name: UnRegisterCallbackInner002
89  * @tc.desc: Verify the RRegisterCallbackInner function.
90  * @tc.type: FUNC
91  * @tc.require: issueI7UYAL
92  */
93 HWTEST_F(CloudSyncServiceProxyTest, UnRegisterCallbackInner002, TestSize.Level1)
94 {
95     GTEST_LOG_(INFO) << "UnRegisterCallbackInner Start";
96     string bundleName = "com.ohos.photos";
97     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
98     int result = proxy_->UnRegisterCallbackInner(bundleName);
99     EXPECT_EQ(result, E_OK);
100     GTEST_LOG_(INFO) << "UnRegisterCallbackInner End";
101 }
102 
103 
104 /**
105  * @tc.name: RegisterCallbackInner001
106  * @tc.desc: Verify the RegisterCallbackInner function.
107  * @tc.type: FUNC
108  * @tc.require: issueI7UYAL
109  */
110 HWTEST_F(CloudSyncServiceProxyTest, RegisterCallbackInner001, TestSize.Level1)
111 {
112     GTEST_LOG_(INFO) << "RegisterCallbackInner Start";
113     string bundleName = "com.ohos.photos";
114 
115     int result = proxy_->RegisterCallbackInner(nullptr, bundleName);
116     EXPECT_EQ(result, E_INVAL_ARG);
117     GTEST_LOG_(INFO) << "RegisterCallbackInner End";
118 }
119 
120 /**
121  * @tc.name: RegisterCallbackInner002
122  * @tc.desc: Verify the RegisterCallbackInner function.
123  * @tc.type: FUNC
124  * @tc.require: I6H5MH
125  */
126 HWTEST_F(CloudSyncServiceProxyTest, RegisterCallbackInner002, TestSize.Level1)
127 {
128     GTEST_LOG_(INFO) << "RegisterCallbackInner Start";
129     string bundleName = "com.ohos.photos";
130     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
131 
132     int result = proxy_->RegisterCallbackInner(remote_, bundleName);
133     EXPECT_EQ(result, E_BROKEN_IPC);
134     GTEST_LOG_(INFO) << "RegisterCallbackInner End";
135 }
136 
137 /**
138  * @tc.name: RegisterCallbackInner003
139  * @tc.desc: Verify the RegisterCallbackInner function.
140  * @tc.type: FUNC
141  * @tc.require: I6H5MH
142  */
143 HWTEST_F(CloudSyncServiceProxyTest, RegisterCallbackInner003, TestSize.Level1)
144 {
145     GTEST_LOG_(INFO) << "RegisterCallbackInner Start";
146     string bundleName = "com.ohos.photos";
147     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
148 
149     int result = proxy_->RegisterCallbackInner(remote_, bundleName);
150     EXPECT_EQ(result, E_OK);
151     GTEST_LOG_(INFO) << "RegisterCallbackInner End";
152 }
153 
154 /**
155  * @tc.name: StartSyncInner001
156  * @tc.desc: Verify the StartSyncInner function.
157  * @tc.type: FUNC
158  * @tc.require: I6H5MH
159  */
160 HWTEST_F(CloudSyncServiceProxyTest, StartSyncInner001, TestSize.Level1)
161 {
162     GTEST_LOG_(INFO) << "StartSyncInner Start";
163     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
164 
165     bool forceFlag = true;
166     int result = proxy_->StartSyncInner(forceFlag);
167     EXPECT_EQ(result, E_BROKEN_IPC);
168     GTEST_LOG_(INFO) << "StartSyncInner End";
169 }
170 
171 /**
172  * @tc.name: StartSyncInner002
173  * @tc.desc: Verify the StartSyncInner function.
174  * @tc.type: FUNC
175  * @tc.require: I6H5MH
176  */
177 HWTEST_F(CloudSyncServiceProxyTest, StartSyncInner002, TestSize.Level1)
178 {
179     GTEST_LOG_(INFO) << "StartSyncInner Start";
180     EXPECT_CALL(*mock_, SendRequest(_, _, _, _))
181         .Times(2)
182         .WillOnce(Invoke(mock_.GetRefPtr(), &CloudSyncServiceMock::InvokeSendRequest))
183         .WillOnce(Return(EPERM));
184 
185     bool forceFlag = true;
186     int result = proxy_->StartSyncInner(forceFlag);
187     EXPECT_EQ(result, E_OK);
188 
189     result = proxy_->StartSyncInner(forceFlag);
190     EXPECT_NE(result, E_OK);
191     GTEST_LOG_(INFO) << "StartSyncInner End";
192 }
193 
194 /**
195  * @tc.name: TriggerSyncInnerInner001
196  * @tc.desc: Verify the TriggerSyncInner function.
197  * @tc.type: FUNC
198  * @tc.require: I6H5MH
199  */
200 HWTEST_F(CloudSyncServiceProxyTest, TriggerSyncInner001, TestSize.Level1)
201 {
202     GTEST_LOG_(INFO) << "TriggerSyncInner Start";
203     string bundleName = "com.ohos.photos";
204     int32_t userId = 100;
205     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
206 
207     int result = proxy_->TriggerSyncInner(bundleName, userId);
208     EXPECT_EQ(result, E_BROKEN_IPC);
209     GTEST_LOG_(INFO) << "TriggerSyncInner End";
210 }
211 
212 /**
213  * @tc.name: TriggerSyncInner002
214  * @tc.desc: Verify the TriggerSyncInner function.
215  * @tc.type: FUNC
216  * @tc.require: I6H5MH
217  */
218 HWTEST_F(CloudSyncServiceProxyTest, TriggerSyncInner002, TestSize.Level1)
219 {
220     GTEST_LOG_(INFO) << "TriggerSyncInner Start";
221     string bundleName = "com.ohos.photos";
222     int32_t userId = 100;
223     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
224 
225     int result = proxy_->TriggerSyncInner(bundleName, userId);
226     EXPECT_EQ(result, E_OK);
227     GTEST_LOG_(INFO) << "TriggerSyncInner End";
228 }
229 
230 /**
231  * @tc.name: GetSyncTimeInner001
232  * @tc.desc: Verify the GetSyncTimeInner function.
233  * @tc.type: FUNC
234  * @tc.require: I6H5MH
235  */
236 HWTEST_F(CloudSyncServiceProxyTest, GetSyncTimeInner001, TestSize.Level1)
237 {
238     GTEST_LOG_(INFO) << "GetSyncTimeInner Start";
239     string bundleName = "com.ohos.photos";
240     int64_t syncTime = 0;
241     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
242 
243     int result = proxy_->GetSyncTimeInner(syncTime, bundleName);
244     EXPECT_EQ(result, E_BROKEN_IPC);
245     GTEST_LOG_(INFO) << "GetSyncTimeInner End";
246 }
247 
248 /**
249  * @tc.name: GetSyncTimeInner002
250  * @tc.desc: Verify the GetSyncTimeInner function.
251  * @tc.type: FUNC
252  * @tc.require: I6H5MH
253  */
254 HWTEST_F(CloudSyncServiceProxyTest, GetSyncTimeInner002, TestSize.Level1)
255 {
256     GTEST_LOG_(INFO) << "GetSyncTimeInner Start";
257     string bundleName = "com.ohos.photos";
258     int64_t syncTime = 0;
259     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
260 
261     int result = proxy_->GetSyncTimeInner(syncTime, bundleName);
262     EXPECT_EQ(result, E_OK);
263     GTEST_LOG_(INFO) << "GetSyncTimeInner End";
264 }
265 
266 /**
267  * @tc.name: BatchDentryFileInsert001
268  * @tc.desc: Verify the BatchCleanFile function.
269  * @tc.type: FUNC
270  * @tc.require: I6H5MH
271  */
272 HWTEST_F(CloudSyncServiceProxyTest, BatchDentryFileInsert001, TestSize.Level1)
273 {
274     GTEST_LOG_(INFO) << "BatchDentryFileInsert001 Start";
275     std::vector<DentryFileInfoObj> fileInfoObj;
276     std::vector<std::string> failCloudId;
277     int ret = proxy_->BatchDentryFileInsert(fileInfoObj, failCloudId);
278     EXPECT_EQ(ret, E_INVAL_ARG);
279     GTEST_LOG_(INFO) << "BatchDentryFileInsert001 End";
280 }
281 
282 /**
283  * @tc.name: BatchDentryFileInsert002
284  * @tc.desc: Verify the BatchCleanFile function.
285  * @tc.type: FUNC
286  * @tc.require: I6H5MH
287  */
288 HWTEST_F(CloudSyncServiceProxyTest, BatchDentryFileInsert002, TestSize.Level1)
289 {
290     GTEST_LOG_(INFO) << "BatchDentryFileInsert002 Start";
291     DentryFileInfo obj;
292     std::vector<DentryFileInfoObj> fileInfoObj;
293     fileInfoObj.push_back(obj);
294     std::vector<std::string> failCloudId;
295     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
296     int ret = proxy_->BatchDentryFileInsert(fileInfoObj, failCloudId);
297     EXPECT_EQ(ret, E_BROKEN_IPC);
298     GTEST_LOG_(INFO) << "BatchDentryFileInsert002 End";
299 }
300 
301 /**
302  * @tc.name: BatchDentryFileInsert003
303  * @tc.desc: Verify the BatchCleanFile function.
304  * @tc.type: FUNC
305  * @tc.require: I6H5MH
306  */
307 HWTEST_F(CloudSyncServiceProxyTest, BatchDentryFileInsert003, TestSize.Level1)
308 {
309     GTEST_LOG_(INFO) << "BatchDentryFileInsert003 Start";
310     DentryFileInfo obj;
311     std::vector<DentryFileInfoObj> fileInfoObj;
312     fileInfoObj.push_back(obj);
313     std::vector<std::string> failCloudId;
314     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
315     int ret = proxy_->BatchDentryFileInsert(fileInfoObj, failCloudId);
316     EXPECT_EQ(ret, E_OK);
317     GTEST_LOG_(INFO) << "BatchDentryFileInsert003 End";
318 }
319 
320 /**
321  * @tc.name: CleanCacheInner001
322  * @tc.desc: Verify the CleanCacheInner function.
323  * @tc.type: FUNC
324  * @tc.require: I6H5MH
325  */
326 HWTEST_F(CloudSyncServiceProxyTest, CleanCacheInner001, TestSize.Level1)
327 {
328     GTEST_LOG_(INFO) << "CleanCacheInner Start";
329     string uri = "";
330     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
331 
332     int result = proxy_->CleanCacheInner(uri);
333     EXPECT_EQ(result, E_BROKEN_IPC);
334     GTEST_LOG_(INFO) << "CleanCacheInner End";
335 }
336 
337 /**
338  * @tc.name: CleanCacheInner002
339  * @tc.desc: Verify the CleanCacheInner function.
340  * @tc.type: FUNC
341  * @tc.require: I6H5MH
342  */
343 HWTEST_F(CloudSyncServiceProxyTest, CleanCacheInner002, TestSize.Level1)
344 {
345     GTEST_LOG_(INFO) << "CleanCacheInner Start";
346     string uri = "";
347     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
348 
349     int result = proxy_->CleanCacheInner(uri);
350     EXPECT_EQ(result, E_OK);
351     GTEST_LOG_(INFO) << "CleanCacheInner End";
352 }
353 
354 /**
355  * @tc.name: StopSyncInner001
356  * @tc.desc: Verify the StopSyncInner function.
357  * @tc.type: FUNC
358  * @tc.require: I6H5MH
359  */
360 HWTEST_F(CloudSyncServiceProxyTest, StopSyncInner001, TestSize.Level1)
361 {
362     GTEST_LOG_(INFO) << "StopSyncInner Start";
363     string bundleName = "com.ohos.photos";
364     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
365 
366     int result = proxy_->StopSyncInner(bundleName);
367     EXPECT_EQ(result, E_BROKEN_IPC);
368     GTEST_LOG_(INFO) << "StopSyncInner End";
369 }
370 
371 /**
372  * @tc.name: StopSyncInner002
373  * @tc.desc: Verify the StopSyncInner function.
374  * @tc.type: FUNC
375  * @tc.require: I6H5MH
376  */
377 HWTEST_F(CloudSyncServiceProxyTest, StopSyncInner002, TestSize.Level1)
378 {
379     GTEST_LOG_(INFO) << "StopSyncInner Start";
380     string bundleName = "com.ohos.photos";
381     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
382 
383     int result = proxy_->StopSyncInner(bundleName);
384     EXPECT_EQ(result, E_OK);
385     GTEST_LOG_(INFO) << "StopSyncInner End";
386 }
387 
388 /**
389  * @tc.name: ChangeAppSwitch001
390  * @tc.desc: Verify the ChangeAppSwitch function.
391  * @tc.type: FUNC
392  * @tc.require: I6H5MH
393  */
394 HWTEST_F(CloudSyncServiceProxyTest, ChangeAppSwitch001, TestSize.Level1)
395 {
396     GTEST_LOG_(INFO) << "ChangeAppSwitch Start";
397     string accoutId = "100";
398     string bundleName = "com.ohos.photos";
399     bool status = true;
400     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
401 
402     int result = proxy_->ChangeAppSwitch(accoutId, bundleName, status);
403     EXPECT_EQ(result, E_BROKEN_IPC);
404     GTEST_LOG_(INFO) << "ChangeAppSwitch End";
405 }
406 
407 /**
408  * @tc.name: ChangeAppSwitch002
409  * @tc.desc: Verify the ChangeAppSwitch function.
410  * @tc.type: FUNC
411  * @tc.require: I6H5MH
412  */
413 HWTEST_F(CloudSyncServiceProxyTest, ChangeAppSwitch002, TestSize.Level1)
414 {
415     GTEST_LOG_(INFO) << "ChangeAppSwitch Start";
416     string accoutId = "100";
417     string bundleName = "com.ohos.photos";
418     bool status = true;
419     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
420 
421     int result = proxy_->ChangeAppSwitch(accoutId, bundleName, status);
422     EXPECT_EQ(result, E_OK);
423     GTEST_LOG_(INFO) << "ChangeAppSwitch End";
424 }
425 
426 /**
427  * @tc.name: Clean001
428  * @tc.desc: Verify the Clean function.
429  * @tc.type: FUNC
430  * @tc.require: I6H5MH
431  */
432 HWTEST_F(CloudSyncServiceProxyTest, Clean001, TestSize.Level1)
433 {
434     GTEST_LOG_(INFO) << "Clean Start";
435     string accoutId = "100";
436     CleanOptions cleanOptions;
437     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
438 
439     int result = proxy_->Clean(accoutId, cleanOptions);
440     EXPECT_EQ(result, E_BROKEN_IPC);
441     GTEST_LOG_(INFO) << "Clean End";
442 }
443 
444 /**
445  * @tc.name: Clean002
446  * @tc.desc: Verify the Clean function.
447  * @tc.type: FUNC
448  * @tc.require: I6H5MH
449  */
450 HWTEST_F(CloudSyncServiceProxyTest, Clean002, TestSize.Level1)
451 {
452     GTEST_LOG_(INFO) << "Clean Start";
453     string accoutId = "100";
454     CleanOptions cleanOptions;
455     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
456 
457     int result = proxy_->Clean(accoutId, cleanOptions);
458     EXPECT_EQ(result, E_OK);
459     GTEST_LOG_(INFO) << "Clean End";
460 }
461 
462 /**
463  * @tc.name: EnableCloud001
464  * @tc.desc: Verify the EnableCloud function.
465  * @tc.type: FUNC
466  * @tc.require: I6H5MH
467  */
468 HWTEST_F(CloudSyncServiceProxyTest, EnableCloud001, TestSize.Level1)
469 {
470     GTEST_LOG_(INFO) << "EnableCloud Start";
471     string accoutId = "100";
472     SwitchDataObj switchData;
473     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
474 
475     int result = proxy_->EnableCloud(accoutId, switchData);
476     EXPECT_EQ(result, E_BROKEN_IPC);
477     GTEST_LOG_(INFO) << "EnableCloud End";
478 }
479 
480 /**
481  * @tc.name: EnableCloud002
482  * @tc.desc: Verify the EnableCloud function.
483  * @tc.type: FUNC
484  * @tc.require: I6H5MH
485  */
486 HWTEST_F(CloudSyncServiceProxyTest, EnableCloud002, TestSize.Level1)
487 {
488     GTEST_LOG_(INFO) << "EnableCloud Start";
489     string accoutId = "100";
490     SwitchDataObj switchData;
491     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
492 
493     int result = proxy_->EnableCloud(accoutId, switchData);
494     EXPECT_EQ(result, E_OK);
495     GTEST_LOG_(INFO) << "EnableCloud End";
496 }
497 
498 /**
499  * @tc.name: DisableCloud001
500  * @tc.desc: Verify the DisableCloud function.
501  * @tc.type: FUNC
502  * @tc.require: I6H5MH
503  */
504 HWTEST_F(CloudSyncServiceProxyTest, DisableCloud001, TestSize.Level1)
505 {
506     GTEST_LOG_(INFO) << "DisableCloud Start";
507     string accoutId = "100";
508     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
509 
510     int result = proxy_->DisableCloud(accoutId);
511     EXPECT_EQ(result, E_BROKEN_IPC);
512     GTEST_LOG_(INFO) << "DisableCloud End";
513 }
514 
515 /**
516  * @tc.name: DisableCloud002
517  * @tc.desc: Verify the DisableCloud function.
518  * @tc.type: FUNC
519  * @tc.require: I6H5MH
520  */
521 HWTEST_F(CloudSyncServiceProxyTest, DisableCloud002, TestSize.Level1)
522 {
523     GTEST_LOG_(INFO) << "DisableCloud Start";
524     string accoutId = "100";
525     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
526 
527     int result = proxy_->DisableCloud(accoutId);
528     EXPECT_EQ(result, E_OK);
529     GTEST_LOG_(INFO) << "DisableCloud End";
530 }
531 
532 /**
533  * @tc.name: NotifyDataChange001
534  * @tc.desc: Verify the NotifyDataChange function.
535  * @tc.type: FUNC
536  * @tc.require: I6H5MH
537  */
538 HWTEST_F(CloudSyncServiceProxyTest, NotifyDataChange001, TestSize.Level1)
539 {
540     GTEST_LOG_(INFO) << "NotifyDataChange Start";
541     string accoutId = "100";
542     string bundleName = "com.ohos.photos";
543     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
544 
545     int result = proxy_->NotifyDataChange(accoutId, bundleName);
546     EXPECT_EQ(result, E_BROKEN_IPC);
547     GTEST_LOG_(INFO) << "NotifyDataChange End";
548 }
549 
550 /**
551  * @tc.name: NotifyDataChange002
552  * @tc.desc: Verify the NotifyDataChange function.
553  * @tc.type: FUNC
554  * @tc.require: I6H5MH
555  */
556 HWTEST_F(CloudSyncServiceProxyTest, NotifyDataChange002, TestSize.Level1)
557 {
558     GTEST_LOG_(INFO) << "NotifyDataChange Start";
559     string accoutId = "100";
560     string bundleName = "com.ohos.photos";
561     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
562 
563     int result = proxy_->NotifyDataChange(accoutId, bundleName);
564     EXPECT_EQ(result, E_OK);
565     GTEST_LOG_(INFO) << "NotifyDataChange End";
566 }
567 
568 /**
569  * @tc.name: NotifyEventChange001
570  * @tc.desc: Verify the NotifyEventChange function.
571  * @tc.type: FUNC
572  * @tc.require: I6H5MH
573  */
574 HWTEST_F(CloudSyncServiceProxyTest, NotifyEventChange001, TestSize.Level1)
575 {
576     GTEST_LOG_(INFO) << "NotifyEventChange Start";
577     int32_t userId = 100;
578     string eventId = "";
579     string extraData = "";
580     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
581 
582     int result = proxy_->NotifyEventChange(userId, eventId, extraData);
583     EXPECT_EQ(result, E_BROKEN_IPC);
584     GTEST_LOG_(INFO) << "NotifyEventChange End";
585 }
586 
587 /**
588  * @tc.name: NotifyEventChange002
589  * @tc.desc: Verify the NotifyEventChange function.
590  * @tc.type: FUNC
591  * @tc.require: I6H5MH
592  */
593 HWTEST_F(CloudSyncServiceProxyTest, NotifyEventChange002, TestSize.Level1)
594 {
595     GTEST_LOG_(INFO) << "NotifyEventChange Start";
596     int32_t userId = 100;
597     string eventId = "";
598     string extraData = "";
599     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
600 
601     int result = proxy_->NotifyEventChange(userId, eventId, extraData);
602     EXPECT_EQ(result, E_OK);
603     GTEST_LOG_(INFO) << "NotifyEventChange End";
604 }
605 
606 /**
607  * @tc.name: StartDownloadFile001
608  * @tc.desc: Verify the StartDownloadFile function.
609  * @tc.type: FUNC
610  * @tc.require: I6H5MH
611  */
612 HWTEST_F(CloudSyncServiceProxyTest, StartDownloadFile001, TestSize.Level1)
613 {
614     GTEST_LOG_(INFO) << "StartDownloadFile Start";
615     string uri = "file://media";
616     int result = proxy_->StartDownloadFile(uri);
617     EXPECT_EQ(result, E_OK);
618     GTEST_LOG_(INFO) << "StartDownloadFile End";
619 }
620 
621 /**
622  * @tc.name: StartDownloadFile002
623  * @tc.desc: Verify the StartDownloadFile function.
624  * @tc.type: FUNC
625  * @tc.require: I6H5MH
626  */
627 HWTEST_F(CloudSyncServiceProxyTest, StartDownloadFile002, TestSize.Level1)
628 {
629     GTEST_LOG_(INFO) << "StartDownloadFile Start";
630     string uri = "";
631     int result = proxy_->StartDownloadFile(uri);
632     EXPECT_EQ(result, E_INVAL_ARG);
633     GTEST_LOG_(INFO) << "StartDownloadFile End";
634 }
635 
636 /**
637  * @tc.name: StartFileCache001
638  * @tc.desc: Verify the StartFileCache function.
639  * @tc.type: FUNC
640  * @tc.require: I6H5MH
641  */
642 HWTEST_F(CloudSyncServiceProxyTest, StartFileCache001, TestSize.Level1)
643 {
644     GTEST_LOG_(INFO) << "StartFileCache Start";
645     string uri = "file://media";
646     std::vector<std::string> uriVec;
647     uriVec.push_back(uri);
648     int64_t downloadId = 0;
649     int result = proxy_->StartFileCache(uriVec, downloadId);
650     EXPECT_EQ(result, E_OK);
651     GTEST_LOG_(INFO) << "StartFileCache End";
652 }
653 
654 /**
655  * @tc.name: StartFileCache002
656  * @tc.desc: Verify the StartFileCache function.
657  * @tc.type: FUNC
658  * @tc.require: I6H5MH
659  */
660 HWTEST_F(CloudSyncServiceProxyTest, StartFileCache002, TestSize.Level1)
661 {
662     GTEST_LOG_(INFO) << "StartFileCache Start";
663     string uri = "";
664     std::vector<std::string> uriVec;
665     uriVec.push_back(uri);
666     int64_t downloadId = 0;
667     int result = proxy_->StartFileCache(uriVec, downloadId);
668     EXPECT_EQ(result, E_INVAL_ARG);
669     GTEST_LOG_(INFO) << "StartFileCache End";
670 }
671 
672 /**
673  * @tc.name: StopDownloadFile001
674  * @tc.desc: Verify the StopDownloadFile function.
675  * @tc.type: FUNC
676  * @tc.require: I6H5MH
677  */
678 HWTEST_F(CloudSyncServiceProxyTest, StopDownloadFile001, TestSize.Level1)
679 {
680     GTEST_LOG_(INFO) << "StopDownloadFile Start";
681     string uri = "file://media";
682     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
683 
684     int result = proxy_->StopDownloadFile(uri);
685     EXPECT_EQ(result, E_BROKEN_IPC);
686     GTEST_LOG_(INFO) << "StopDownloadFile End";
687 }
688 
689 /**
690  * @tc.name: StopDownloadFile002
691  * @tc.desc: Verify the StopDownloadFile function.
692  * @tc.type: FUNC
693  * @tc.require: I6H5MH
694  */
695 HWTEST_F(CloudSyncServiceProxyTest, StopDownloadFile002, TestSize.Level1)
696 {
697     GTEST_LOG_(INFO) << "StopDownloadFile Start";
698     string uri = "file://media";
699     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
700 
701     int result = proxy_->StopDownloadFile(uri);
702     EXPECT_EQ(result, E_OK);
703     GTEST_LOG_(INFO) << "StopDownloadFile End";
704 }
705 
706 /**
707  * @tc.name: StopDownloadFile003
708  * @tc.desc: Verify the StopDownloadFile function.
709  * @tc.type: FUNC
710  * @tc.require: I6H5MH
711  */
712 HWTEST_F(CloudSyncServiceProxyTest, StopDownloadFile003, TestSize.Level1)
713 {
714     GTEST_LOG_(INFO) << "StopDownloadFile Start";
715     string uri = "";
716 
717     int result = proxy_->StopDownloadFile(uri);
718     EXPECT_EQ(result, E_INVAL_ARG);
719     GTEST_LOG_(INFO) << "StopDownloadFile End";
720 }
721 
722 /**
723  * @tc.name: UploadAsset001
724  * @tc.desc: Verify the UploadAsset function.
725  * @tc.type: FUNC
726  * @tc.require: I6H5MH
727  */
728 HWTEST_F(CloudSyncServiceProxyTest, UploadAsset001, TestSize.Level1)
729 {
730     GTEST_LOG_(INFO) << "UploadAsset001 Start";
731     int32_t userId = 100;
732     string request = "test_request";
733     string result;
734     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
735     int ret = proxy_->UploadAsset(userId, request, result);
736     EXPECT_EQ(ret, E_BROKEN_IPC);
737     GTEST_LOG_(INFO) << "UploadAsset001 End";
738 }
739 
740 /**
741  * @tc.name: UploadAsset002
742  * @tc.desc: Verify the UploadAsset function.
743  * @tc.type: FUNC
744  * @tc.require: I6H5MH
745  */
746 HWTEST_F(CloudSyncServiceProxyTest, UploadAsset002, TestSize.Level1)
747 {
748     GTEST_LOG_(INFO) << "UploadAsset002 Start";
749     int32_t userId = 100;
750     string request = "test_request";
751     string result;
752     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
753     int ret = proxy_->UploadAsset(userId, request, result);
754     EXPECT_EQ(ret, E_OK);
755     GTEST_LOG_(INFO) << "UploadAsset002 End";
756 }
757 
758 /**
759  * @tc.name: DownloadFile001
760  * @tc.desc: Verify the DownloadFile function.
761  * @tc.type: FUNC
762  * @tc.require: I6H5MH
763  */
764 HWTEST_F(CloudSyncServiceProxyTest, DownloadFile001, TestSize.Level1)
765 {
766     GTEST_LOG_(INFO) << "DownloadFile001 Start";
767     int32_t userId = 100;
768     string bundleName = "com.ohos.photos";
769     AssetInfoObj assetInfoObj;
770     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
771     int ret = proxy_->DownloadFile(userId, bundleName, assetInfoObj);
772     EXPECT_EQ(ret, E_BROKEN_IPC);
773     GTEST_LOG_(INFO) << "DownloadFile001 End";
774 }
775 
776 /**
777  * @tc.name: DownloadFile002
778  * @tc.desc: Verify the DownloadFile function.
779  * @tc.type: FUNC
780  * @tc.require: I6H5MH
781  */
782 HWTEST_F(CloudSyncServiceProxyTest, DownloadFile002, TestSize.Level1)
783 {
784     GTEST_LOG_(INFO) << "DownloadFile002 Start";
785     int32_t userId = 100;
786     string bundleName = "com.ohos.photos";
787     AssetInfoObj assetInfoObj;
788     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
789     int ret = proxy_->DownloadFile(userId, bundleName, assetInfoObj);
790     EXPECT_EQ(ret, E_OK);
791     GTEST_LOG_(INFO) << "DownloadFile002 End";
792 }
793 
794 /**
795  * @tc.name: DownloadFiles001
796  * @tc.desc: Verify the DownloadFiles function.
797  * @tc.type: FUNC
798  * @tc.require: I6H5MH
799  */
800 HWTEST_F(CloudSyncServiceProxyTest, DownloadFiles001, TestSize.Level1)
801 {
802     GTEST_LOG_(INFO) << "DownloadFiles001 Start";
803     int32_t userId = 100;
804     string bundleName = "com.ohos.photos";
805     std::vector<AssetInfoObj> assetInfoObj;
806     std::vector<bool> assetResultMap;
807     int ret = proxy_->DownloadFiles(userId, bundleName, assetInfoObj, assetResultMap);
808     EXPECT_EQ(ret, E_INVAL_ARG);
809     GTEST_LOG_(INFO) << "DownloadFiles001 End";
810 }
811 
812 /**
813  * @tc.name: DownloadFiles002
814  * @tc.desc: Verify the DownloadFiles function.
815  * @tc.type: FUNC
816  * @tc.require: I6H5MH
817  */
818 HWTEST_F(CloudSyncServiceProxyTest, DownloadFiles002, TestSize.Level1)
819 {
820     GTEST_LOG_(INFO) << "DownloadFiles002 Start";
821     int32_t userId = 100;
822     string bundleName = "com.ohos.photos";
823     AssetInfoObj obj;
824     std::vector<AssetInfoObj> assetInfoObj;
825     assetInfoObj.push_back(obj);
826     std::vector<bool> assetResultMap;
827     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
828     int ret = proxy_->DownloadFiles(userId, bundleName, assetInfoObj, assetResultMap);
829     EXPECT_EQ(ret, E_BROKEN_IPC);
830     GTEST_LOG_(INFO) << "DownloadFiles002 End";
831 }
832 
833 /**
834  * @tc.name: DownloadFiles003
835  * @tc.desc: Verify the DownloadFiles function.
836  * @tc.type: FUNC
837  * @tc.require: I6H5MH
838  */
839 HWTEST_F(CloudSyncServiceProxyTest, DownloadFiles003, TestSize.Level1)
840 {
841     GTEST_LOG_(INFO) << "DownloadFiles002 Start";
842     int32_t userId = 100;
843     string bundleName = "com.ohos.photos";
844     AssetInfoObj obj;
845     std::vector<AssetInfoObj> assetInfoObj;
846     assetInfoObj.push_back(obj);
847     std::vector<bool> assetResultMap;
848     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
849     int ret = proxy_->DownloadFiles(userId, bundleName, assetInfoObj, assetResultMap);
850     EXPECT_EQ(ret, E_OK);
851     GTEST_LOG_(INFO) << "DownloadFiles002 End";
852 }
853 
854 /**
855  * @tc.name: DownloadAsset001
856  * @tc.desc: Verify the DownloadAsset function.
857  * @tc.type: FUNC
858  * @tc.require: I6H5MH
859  */
860 HWTEST_F(CloudSyncServiceProxyTest, DownloadAsset001, TestSize.Level1)
861 {
862     GTEST_LOG_(INFO) << "DownloadAsset001 Start";
863     uint64_t taskId = 100;
864     int32_t userId = 100;
865     string bundleName = "com.ohos.photos";
866     string networkId = "";
867     AssetInfoObj assetInfoObj;
868     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
869     int ret = proxy_->DownloadAsset(taskId, userId, bundleName, networkId, assetInfoObj);
870     EXPECT_EQ(ret, E_BROKEN_IPC);
871     GTEST_LOG_(INFO) << "DownloadAsset001 End";
872 }
873 
874 /**
875  * @tc.name: DownloadAsset002
876  * @tc.desc: Verify the DownloadAsset function.
877  * @tc.type: FUNC
878  * @tc.require: I6H5MH
879  */
880 HWTEST_F(CloudSyncServiceProxyTest, DownloadAsset002, TestSize.Level1)
881 {
882     GTEST_LOG_(INFO) << "DownloadAsset002 Start";
883     uint64_t taskId = 100;
884     int32_t userId = 100;
885     string bundleName = "com.ohos.photos";
886     string networkId = "";
887     AssetInfoObj assetInfoObj;
888     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
889     int ret = proxy_->DownloadAsset(taskId, userId, bundleName, networkId, assetInfoObj);
890     EXPECT_EQ(ret, E_OK);
891     GTEST_LOG_(INFO) << "DownloadAsset002 End";
892 }
893 
894 /**
895  * @tc.name: RegisterDownloadAssetCallback001
896  * @tc.desc: Verify the RegisterDownloadAssetCallback function.
897  * @tc.type: FUNC
898  * @tc.require: I6H5MH
899  */
900 HWTEST_F(CloudSyncServiceProxyTest, RegisterDownloadAssetCallback001, TestSize.Level1)
901 {
902     GTEST_LOG_(INFO) << "RegisterDownloadAssetCallback Start";
903 
904     int ret = proxy_->RegisterDownloadAssetCallback(nullptr);
905     EXPECT_EQ(ret, E_INVAL_ARG);
906     GTEST_LOG_(INFO) << "RegisterDownloadAssetCallback End";
907 }
908 
909 /**
910  * @tc.name: RegisterDownloadAssetCallback002
911  * @tc.desc: Verify the RegisterDownloadAssetCallback function.
912  * @tc.type: FUNC
913  * @tc.require: I6H5MH
914  */
915 HWTEST_F(CloudSyncServiceProxyTest, RegisterDownloadAssetCallback002, TestSize.Level1)
916 {
917     GTEST_LOG_(INFO) << "RegisterDownloadAssetCallback Start";
918     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
919 
920     int ret = proxy_->RegisterDownloadAssetCallback(remote_);
921     EXPECT_EQ(ret, E_BROKEN_IPC);
922     GTEST_LOG_(INFO) << "RegisterDownloadAssetCallback End";
923 }
924 
925 /**
926  * @tc.name: RegisterDownloadAssetCallback003
927  * @tc.desc: Verify the RegisterDownloadAssetCallback function.
928  * @tc.type: FUNC
929  * @tc.require: I6H5MH
930  */
931 HWTEST_F(CloudSyncServiceProxyTest, RegisterDownloadAssetCallback003, TestSize.Level1)
932 {
933     GTEST_LOG_(INFO) << "RegisterDownloadAssetCallback Start";
934     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
935 
936     int ret = proxy_->RegisterDownloadAssetCallback(remote_);
937     EXPECT_EQ(ret, E_OK);
938     GTEST_LOG_(INFO) << "RegisterDownloadAssetCallback End";
939 }
940 
941 /**
942  * @tc.name: DeleteAsset001
943  * @tc.desc: Verify the DeleteAsset function.
944  * @tc.type: FUNC
945  * @tc.require: I6H5MH
946  */
947 HWTEST_F(CloudSyncServiceProxyTest, DeleteAsset001, TestSize.Level1)
948 {
949     GTEST_LOG_(INFO) << "DeleteAsset001 Start";
950     int32_t userId = 100;
951     string uri = "file://media";
952     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
953 
954     int ret = proxy_->DeleteAsset(userId, uri);
955     EXPECT_EQ(ret, E_BROKEN_IPC);
956     GTEST_LOG_(INFO) << "DeleteAsset001 End";
957 }
958 
959 /**
960  * @tc.name: DeleteAsset002
961  * @tc.desc: Verify the DeleteAsset function.
962  * @tc.type: FUNC
963  * @tc.require: I6H5MH
964  */
965 HWTEST_F(CloudSyncServiceProxyTest, DeleteAsset002, TestSize.Level1)
966 {
967     GTEST_LOG_(INFO) << "DeleteAsset002 Start";
968     int32_t userId = 100;
969     string uri = "file://media";
970     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
971     int ret = proxy_->DeleteAsset(userId, uri);
972     EXPECT_EQ(ret, E_OK);
973     GTEST_LOG_(INFO) << "DeleteAsset002 End";
974 }
975 
976 /**
977  * @tc.name: RegisterDownloadFileCallback001
978  * @tc.desc: Verify the RegisterDownloadFileCallback function.
979  * @tc.type: FUNC
980  * @tc.require: issueI7UYAL
981  */
982 HWTEST_F(CloudSyncServiceProxyTest, RegisterDownloadFileCallback001, TestSize.Level1)
983 {
984     GTEST_LOG_(INFO) << "RegisterDownloadFileCallback Start";
985     string bundleName = "com.ohos.photos";
986 
987     int result = proxy_->RegisterDownloadFileCallback(nullptr);
988     EXPECT_EQ(result, E_INVAL_ARG);
989     GTEST_LOG_(INFO) << "RegisterDownloadFileCallback End";
990 }
991 
992 /**
993  * @tc.name: RegisterDownloadFileCallback002
994  * @tc.desc: Verify the RegisterDownloadFileCallback function.
995  * @tc.type: FUNC
996  * @tc.require: I6H5MH
997  */
998 HWTEST_F(CloudSyncServiceProxyTest, RegisterDownloadFileCallback002, TestSize.Level1)
999 {
1000     GTEST_LOG_(INFO) << "RegisterDownloadFileCallback Start";
1001     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
1002 
1003     int result = proxy_->RegisterDownloadFileCallback(remote_);
1004     EXPECT_EQ(result, E_BROKEN_IPC);
1005     GTEST_LOG_(INFO) << "RegisterDownloadFileCallback End";
1006 }
1007 
1008 /**
1009  * @tc.name: RegisterDownloadFileCallback003
1010  * @tc.desc: Verify the RegisterDownloadFileCallback function.
1011  * @tc.type: FUNC
1012  * @tc.require: I6H5MH
1013  */
1014 HWTEST_F(CloudSyncServiceProxyTest, RegisterDownloadFileCallback003, TestSize.Level1)
1015 {
1016     GTEST_LOG_(INFO) << "RegisterDownloadFileCallback Start";
1017     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
1018 
1019     int result = proxy_->RegisterDownloadFileCallback(remote_);
1020     EXPECT_EQ(result, E_OK);
1021     GTEST_LOG_(INFO) << "RegisterDownloadFileCallback End";
1022 }
1023 
1024 /**
1025  * @tc.name: UnregisterDownloadFileCallback001
1026  * @tc.desc: Verify the UnegisterDownloadFileCallback function.
1027  * @tc.type: FUNC
1028  * @tc.require: issueI7UYAL
1029  */
1030 HWTEST_F(CloudSyncServiceProxyTest, UnregisterDownloadFileCallback001, TestSize.Level1)
1031 {
1032     GTEST_LOG_(INFO) << "UnregisterDownloadFileCallback Start";
1033     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
1034     int result = proxy_->UnregisterDownloadFileCallback();
1035 
1036     EXPECT_EQ(result, E_BROKEN_IPC);
1037     GTEST_LOG_(INFO) << "UnregisterDownloadFileCallback End";
1038 }
1039 
1040 /**
1041  * @tc.name: UnregisterDownloadFileCallback002
1042  * @tc.desc: Verify the UnegisterDownloadFileCallback function.
1043  * @tc.type: FUNC
1044  * @tc.require: issueI7UYAL
1045  */
1046 HWTEST_F(CloudSyncServiceProxyTest, UnregisterDownloadFileCallback002, TestSize.Level1)
1047 {
1048     GTEST_LOG_(INFO) << "UnregisterDownloadFileCallback Start";
1049     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
1050     int result = proxy_->UnregisterDownloadFileCallback();
1051 
1052     EXPECT_EQ(result, E_OK);
1053     GTEST_LOG_(INFO) << "UnregisterDownloadFileCallback End";
1054 }
1055 
1056 /**
1057  * @tc.name: BatchCleanFile001
1058  * @tc.desc: Verify the BatchCleanFile function.
1059  * @tc.type: FUNC
1060  * @tc.require: I6H5MH
1061  */
1062 HWTEST_F(CloudSyncServiceProxyTest, BatchCleanFile001, TestSize.Level1)
1063 {
1064     GTEST_LOG_(INFO) << "BatchCleanFile001 Start";
1065     std::vector<CleanFileInfoObj> fileInfoObj;
1066     std::vector<std::string> failCloudId;
1067     int ret = proxy_->BatchCleanFile(fileInfoObj, failCloudId);
1068     EXPECT_EQ(ret, E_INVAL_ARG);
1069     GTEST_LOG_(INFO) << "BatchCleanFile001 End";
1070 }
1071 
1072 /**
1073  * @tc.name: DeleteFilesInner002
1074  * @tc.desc: Verify the BatchCleanFile function.
1075  * @tc.type: FUNC
1076  * @tc.require: I6H5MH
1077  */
1078 HWTEST_F(CloudSyncServiceProxyTest, BatchCleanFile002, TestSize.Level1)
1079 {
1080     GTEST_LOG_(INFO) << "BatchCleanFile002 Start";
1081     CleanFileInfo obj;
1082     std::vector<CleanFileInfoObj> fileInfoObj;
1083     fileInfoObj.push_back(obj);
1084     std::vector<std::string> failCloudId;
1085     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(-1));
1086     int ret = proxy_->BatchCleanFile(fileInfoObj, failCloudId);
1087     EXPECT_EQ(ret, E_BROKEN_IPC);
1088     GTEST_LOG_(INFO) << "DownloadFiles002 End";
1089 }
1090 
1091 /**
1092  * @tc.name: BatchCleanFile003
1093  * @tc.desc: Verify the BatchCleanFile function.
1094  * @tc.type: FUNC
1095  * @tc.require: I6H5MH
1096  */
1097 HWTEST_F(CloudSyncServiceProxyTest, BatchCleanFile003, TestSize.Level1)
1098 {
1099     GTEST_LOG_(INFO) << "BatchCleanFile003 Start";
1100     CleanFileInfo obj;
1101     std::vector<CleanFileInfoObj> fileInfoObj;
1102     fileInfoObj.push_back(obj);
1103     std::vector<std::string> failCloudId;
1104     EXPECT_CALL(*mock_, SendRequest(_, _, _, _)).Times(1).WillOnce(Return(E_OK));
1105     int ret = proxy_->BatchCleanFile(fileInfoObj, failCloudId);
1106     EXPECT_EQ(ret, E_OK);
1107     GTEST_LOG_(INFO) << "DeleteFilesInner003 End";
1108 }
1109 } // namespace Test
1110 } // namespace FileManagement::CloudSync {
1111 } // namespace OHOS