• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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 "mac_address_info.h"
18 
19 #include "netmgr_ext_log_wrapper.h"
20 #include "parcel.h"
21 #include "refbase.h"
22 
23 #ifdef GTEST_API_
24 #define private public
25 #define protected public
26 #endif
27 
28 namespace OHOS {
29 namespace NetManagerStandard {
30 namespace {
31 using namespace testing::ext;
32 }
33 
34 class MacAddressInfoTest : public testing::Test {
35 public:
36     static void SetUpTestCase();
37     static void TearDownTestCase();
38     void SetUp();
39     void TearDown();
40 };
41 
SetUpTestCase()42 void MacAddressInfoTest::SetUpTestCase() {};
43 
TearDownTestCase()44 void MacAddressInfoTest::TearDownTestCase() {};
45 
SetUp()46 void MacAddressInfoTest::SetUp() {};
47 
TearDown()48 void MacAddressInfoTest::TearDown() {};
49 
50 HWTEST_F(MacAddressInfoTest, MarshallingTest001, TestSize.Level1)
51 {
52     MacAddressInfo macaddressinfo;
53     Parcel parcel;
54     EXPECT_TRUE(macaddressinfo.Marshalling(parcel));
55 }
56 
57 HWTEST_F(MacAddressInfoTest, UnmarshallingTest001, TestSize.Level1)
58 {
59     MacAddressInfo macaddressinfo;
60     Parcel parcel;
61     EXPECT_EQ(macaddressinfo.Unmarshalling(parcel), nullptr);
62 }
63 }
64 }