/* * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "fuse_manager/fuse_manager.h" #include "dfs_error.h" #include "utils_log.h" #include #include #include #include namespace OHOS::FileManagement::CloudFile::Test { using namespace testing; using namespace testing::ext; using namespace std; class FuseManagerTest : public testing::Test { public: static void SetUpTestCase(void); static void TearDownTestCase(void); void SetUp(); void TearDown(); std::shared_ptr fuseManager_; }; void FuseManagerTest::SetUpTestCase(void) { GTEST_LOG_(INFO) << "SetUpTestCase"; } void FuseManagerTest::TearDownTestCase(void) { GTEST_LOG_(INFO) << "TearDownTestCase"; } void FuseManagerTest::SetUp(void) { GTEST_LOG_(INFO) << "SetUp"; fuseManager_ = std::make_shared(); } void FuseManagerTest::TearDown(void) { GTEST_LOG_(INFO) << "TearDown"; } /** * @tc.name: GetInstanceTest * @tc.desc: Verify the GetInstance function * @tc.type: FUNC * @tc.require: I6H5MH */ HWTEST_F(FuseManagerTest, GetInstanceTest, TestSize.Level1) { GTEST_LOG_(INFO) << "GetInstanceTest Start"; try { FuseManager::GetInstance(); EXPECT_TRUE(true); } catch (...) { EXPECT_TRUE(false); GTEST_LOG_(INFO) << "GetInstanceTest ERROR"; } GTEST_LOG_(INFO) << "GetInstanceTest End"; } } // namespace OHOS::FileManagement::CloudSync::Test