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 
18 #include "device_profile.h"
19 
20 using namespace testing::ext;
21 namespace OHOS {
22 namespace DistributedDeviceProfile {
23 class DeviceProfileTest : public testing::Test {
24 public:
25     static void SetUpTestCase();
26     static void TearDownTestCase();
27     void SetUp();
28     void TearDown();
29 };
30 
SetUpTestCase()31 void DeviceProfileTest::SetUpTestCase()
32 {
33 }
34 
TearDownTestCase()35 void DeviceProfileTest::TearDownTestCase()
36 {
37 }
38 
SetUp()39 void DeviceProfileTest::SetUp()
40 {
41 }
42 
TearDown()43 void DeviceProfileTest::TearDown()
44 {
45 }
46 
47 HWTEST_F(DeviceProfileTest, Marshalling_001, TestSize.Level0)
48 {
49     DeviceProfile deviceProfile;
50     MessageParcel parcel;
51     auto result = deviceProfile.Marshalling(parcel);
52     EXPECT_EQ(true, result);
53 }
54 
55 HWTEST_F(DeviceProfileTest, UnMarshalling_001, TestSize.Level0)
56 {
57     DeviceProfile deviceProfile;
58     MessageParcel parcel;
59     auto result = deviceProfile.UnMarshalling(parcel);
60     EXPECT_EQ(false, result);
61 }
62 
63 HWTEST_F(DeviceProfileTest, dump_001, TestSize.Level0)
64 {
65     DeviceProfile deviceProfile;
66     auto result = deviceProfile.dump();
67     EXPECT_NE(0, result.length());
68 }
69 }
70 }