• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 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 "local_hardware_manager_test.h"
17 
18 #define private public
19 #include "capability_info_manager.h"
20 #include "component_loader.h"
21 #include "local_hardware_manager.h"
22 #undef private
23 
24 using namespace testing::ext;
25 
26 namespace OHOS {
27 namespace DistributedHardware {
SetUpTestCase(void)28 void LocalHardwareManagerTest::SetUpTestCase(void)
29 {
30     ComponentLoader::GetInstance().Init();
31 }
32 
TearDownTestCase(void)33 void LocalHardwareManagerTest::TearDownTestCase(void)
34 {
35     ComponentLoader::GetInstance().UnInit();
36 }
37 
SetUp()38 void LocalHardwareManagerTest::SetUp() {}
39 
TearDown()40 void LocalHardwareManagerTest::TearDown() {}
41 
42 /**
43  * @tc.name: local_hardware_manager_test_001
44  * @tc.desc: Verify the Init function.
45  * @tc.type: FUNC
46  * @tc.require: AR000GHSK3
47  */
48 HWTEST_F(LocalHardwareManagerTest, local_hardware_manager_test_001, TestSize.Level0)
49 {
50     LocalHardwareManager::GetInstance().Init();
51 }
52 
53 /**
54  * @tc.name: local_hardware_manager_test_002
55  * @tc.desc: Verify the UnInit function.
56  * @tc.type: FUNC
57  * @tc.require: AR000GHSK3
58  */
59 HWTEST_F(LocalHardwareManagerTest, local_hardware_manager_test_002, TestSize.Level0)
60 {
61     LocalHardwareManager::GetInstance().UnInit();
62 }
63 } // namespace DistributedHardware
64 } // namespace OHOS
65