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 "cloud/asset_loader.h"
17 
18 #include <gtest/gtest.h>
19 
20 using namespace testing::ext;
21 using namespace OHOS::DistributedData;
22 
23 class AssetLoaderTest : public testing::Test {};
24 
25 /**
26 * @tc.name: Download
27 * @tc.desc: download.
28 * @tc.type: FUNC
29 */
30 HWTEST_F(AssetLoaderTest, Download, TestSize.Level1)
31 {
32     AssetLoader loader;
33     std::string tableName;
34     std::string gid;
35     Value prefix;
36     VBucket assets;
37     auto ret = loader.Download(tableName, gid, prefix, assets);
38     ASSERT_EQ(ret, E_NOT_SUPPORT);
39 }
40 
41 /**
42 * @tc.name: RemoveLocalAssets
43 * @tc.desc: remove local assets.
44 * @tc.type: FUNC
45 */
46 HWTEST_F(AssetLoaderTest, RemoveLocalAssets, TestSize.Level1)
47 {
48     AssetLoader loader;
49     std::string tableName;
50     std::string gid;
51     Value prefix;
52     VBucket assets;
53     auto ret = loader.RemoveLocalAssets(tableName, gid, prefix, assets);
54     ASSERT_EQ(ret, E_NOT_SUPPORT);
55 }
56