1 /*
2 * Copyright (c) 2021-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 <thread>
17
18 #include <gtest/gtest.h>
19
20 #include "net_access_policy.h"
21
22 namespace OHOS {
23 namespace NetManagerStandard {
24
25 using namespace testing::ext;
26 class NetworkAccessPolicyTest : public testing::Test {
27 public:
28 static void SetUpTestCase();
29 static void TearDownTestCase();
30 void SetUp();
31 void TearDown();
32 };
33
SetUpTestCase()34 void NetworkAccessPolicyTest::SetUpTestCase() {}
35
TearDownTestCase()36 void NetworkAccessPolicyTest::TearDownTestCase() {}
37
SetUp()38 void NetworkAccessPolicyTest::SetUp() {}
39
TearDown()40 void NetworkAccessPolicyTest::TearDown() {}
41
42 HWTEST_F(NetworkAccessPolicyTest, GetSupplierCallbackTest001, TestSize.Level1)
43 {
44 NetworkAccessPolicy networkaccesspolicy;
45 Parcel parcel;
46 AccessPolicySave policies;
47 bool flag = true;
48 auto result = networkaccesspolicy.Marshalling(parcel, policies, flag);
49 EXPECT_EQ(result, 0);
50 flag = false;
51 result = networkaccesspolicy.Marshalling(parcel, policies, flag);
52 EXPECT_EQ(result, 0);
53 }
54 }
55 }