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 #ifdef GTEST_API_ 21 #define private public 22 #define protected public 23 #endif 24 #include "net_access_policy_config.h" 25 26 namespace OHOS { 27 namespace NetManagerStandard { 28 29 using namespace testing::ext; 30 class NetAccessPolicyConfigUtilsTest : public testing::Test { 31 public: 32 static void SetUpTestCase(); 33 static void TearDownTestCase(); 34 void SetUp(); 35 void TearDown(); 36 }; 37 SetUpTestCase()38void NetAccessPolicyConfigUtilsTest::SetUpTestCase() {} 39 TearDownTestCase()40void NetAccessPolicyConfigUtilsTest::TearDownTestCase() {} 41 SetUp()42void NetAccessPolicyConfigUtilsTest::SetUp() {} 43 TearDown()44void NetAccessPolicyConfigUtilsTest::TearDown() {} 45 46 HWTEST_F(NetAccessPolicyConfigUtilsTest, ReadFileTest001, TestSize.Level1) 47 { 48 NetAccessPolicyConfigUtils config; 49 std::string content; 50 std::string path1 = "etc/netmanager/net_access_policy_config1.json"; 51 EXPECT_EQ(config.ReadFile(content, path1), false); 52 53 std::string path2 = "etc/netmanager/net_access_policy_config.json"; 54 } 55 } 56 }