1 /*
2  * Copyright (c) 2024 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 
20 #define private public
21 #define protected public
22 
23 #include "pasteboard_info_collector.h"
24 
25 #undef private
26 #undef protected
27 
28 using namespace testing::ext;
29 namespace OHOS {
30 namespace DistributedDeviceProfile {
31 using namespace std;
32 namespace {
33     const std::string TAG = "ContentSensorPasteboardInfoTest";
34 }
35 class ContentSensorPasteboardInfoTest : public testing::Test {
36 public:
37     static void SetUpTestCase();
38     static void TearDownTestCase();
39     void SetUp();
40     void TearDown();
41 };
42 
SetUpTestCase()43 void ContentSensorPasteboardInfoTest::SetUpTestCase()
44 {
45 }
46 
TearDownTestCase()47 void ContentSensorPasteboardInfoTest::TearDownTestCase()
48 {
49 }
50 
SetUp()51 void ContentSensorPasteboardInfoTest::SetUp()
52 {
53 }
54 
TearDown()55 void ContentSensorPasteboardInfoTest::TearDown()
56 {
57 }
58 
59 /*
60  * @tc.name: ConvertToProfile001
61  * @tc.desc: ConvertToProfile
62  * @tc.type: FUNC
63  * @tc.require:
64  */
65 HWTEST_F(ContentSensorPasteboardInfoTest, ConvertToProfile001, TestSize.Level1)
66 {
67     PasteboardInfoCollector pasteboardInfoCollector;
68     std::vector<ServiceProfile> svrProfileList;
69     bool result = pasteboardInfoCollector.ConvertToProfile(svrProfileList);
70     EXPECT_EQ(result, true);
71 }
72 
73 /*
74  * @tc.name: ConvertToProfile002
75  * @tc.desc: ConvertToProfile
76  * @tc.type: FUNC
77  * @tc.require:
78  */
79 HWTEST_F(ContentSensorPasteboardInfoTest, ConvertToProfile002, TestSize.Level1)
80 {
81     PasteboardInfoCollector pasteboardInfoCollector;
82     std::vector<CharacteristicProfile> charProfileList;
83     bool result = pasteboardInfoCollector.ConvertToProfile(charProfileList);
84     EXPECT_EQ(result, true);
85 }
86 }
87 }
88