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 18 #include "cloud_sync_asset_manager_impl.h" 19 #include "cloud_sync_asset_manager.h" 20 21 namespace OHOS::FileManagement::CloudSync::Test { 22 using namespace testing::ext; 23 using namespace testing; 24 using namespace std; 25 26 class CloudSyncAssetManagerTest : public testing::Test { 27 public: 28 static void SetUpTestCase(void); 29 static void TearDownTestCase(void); 30 void SetUp(); 31 void TearDown(); 32 }; 33 SetUpTestCase(void)34void CloudSyncAssetManagerTest::SetUpTestCase(void) 35 { 36 std::cout << "SetUpTestCase" << std::endl; 37 } 38 TearDownTestCase(void)39void CloudSyncAssetManagerTest::TearDownTestCase(void) 40 { 41 std::cout << "TearDownTestCase" << std::endl; 42 } 43 SetUp(void)44void CloudSyncAssetManagerTest::SetUp(void) 45 { 46 std::cout << "SetUp" << std::endl; 47 } 48 TearDown(void)49void CloudSyncAssetManagerTest::TearDown(void) 50 { 51 std::cout << "TearDown" << std::endl; 52 } 53 54 /** 55 * @tc.name: GetInstanceTest 56 * @tc.desc: Verify the GetInstance function 57 * @tc.type: FUNC 58 * @tc.require: I6JPKG 59 */ 60 HWTEST_F(CloudSyncAssetManagerTest, GetInstanceTest, TestSize.Level1) 61 { 62 GTEST_LOG_(INFO) << "GetInstanceTest Begin"; 63 try { 64 CloudSyncAssetManager::GetInstance(); 65 EXPECT_TRUE(true); 66 } catch (...) { 67 EXPECT_TRUE(false); 68 GTEST_LOG_(INFO) << "GetInstanceTest ERROR"; 69 } 70 71 GTEST_LOG_(INFO) << "GetInstanceTest End"; 72 } 73 74 } // namespace OHOS::FileManagement::CloudSync::Test 75