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 <string>
18 #include <vector>
19 #include <iostream>
20 
21 #include "distributed_device_profile_constants.h"
22 #include "distributed_device_profile_log.h"
23 #include "distributed_device_profile_errors.h"
24 #define private public
25 #define protected public
26 
27 #include "content_sensor_manager.h"
28 
29 #undef private
30 #undef protected
31 
32 using namespace testing::ext;
33 namespace OHOS {
34 namespace DistributedDeviceProfile {
35 using namespace std;
36 namespace {
37     const std::string TAG = "ContentSensorManagerTest";
38 }
39 class ContentSensorManagerTest : public testing::Test {
40 public:
41     static void SetUpTestCase();
42     static void TearDownTestCase();
43     void SetUp();
44     void TearDown();
45 };
46 
SetUpTestCase()47 void ContentSensorManagerTest::SetUpTestCase()
48 {
49 }
50 
TearDownTestCase()51 void ContentSensorManagerTest::TearDownTestCase()
52 {
53 }
54 
SetUp()55 void ContentSensorManagerTest::SetUp()
56 {
57 }
58 
TearDown()59 void ContentSensorManagerTest::TearDown()
60 {
61 }
62 
63 /*
64  * @tc.name: Init001
65  * @tc.desc: Init
66  * @tc.type: FUNC
67  * @tc.require:
68  */
69 HWTEST_F(ContentSensorManagerTest, Init001, TestSize.Level1)
70 {
71     ContentSensorManager contentSensorManager_;
72     int32_t result = contentSensorManager_.Init();
73     EXPECT_EQ(result, 0);
74 }
75 
76 /*
77  * @tc.name: UnInit001
78  * @tc.desc: Init
79  * @tc.type: FUNC
80  * @tc.require:
81  */
82 HWTEST_F(ContentSensorManagerTest, UnInit001, TestSize.Level1)
83 {
84     ContentSensorManager contentSensorManager_;
85     int32_t result = contentSensorManager_.UnInit();
86     EXPECT_EQ(result, 0);
87 }
88 }
89 }
90