• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 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 "netmanager_base_permission.h"
19 
20 namespace OHOS {
21 namespace NetManagerStandard {
22 namespace {
23 using namespace testing::ext;
24 } // namespace
25 
26 class NetManagerPermissionTest : public testing::Test {
27 public:
28     static void SetUpTestCase();
29     static void TearDownTestCase();
30     void SetUp();
31     void TearDown();
32 };
33 
SetUpTestCase()34 void NetManagerPermissionTest::SetUpTestCase() {}
35 
TearDownTestCase()36 void NetManagerPermissionTest::TearDownTestCase() {}
37 
SetUp()38 void NetManagerPermissionTest::SetUp() {}
39 
TearDown()40 void NetManagerPermissionTest::TearDown() {}
41 
42 HWTEST_F(NetManagerPermissionTest, CheckPermissionTest001, TestSize.Level1)
43 {
44     auto ret = NetManagerPermission::CheckPermission({});
45     EXPECT_FALSE(ret);
46 }
47 
48 HWTEST_F(NetManagerPermissionTest, CheckPermissionWithCacheTest001, TestSize.Level1)
49 {
50     auto ret = NetManagerPermission::CheckPermissionWithCache({});
51     EXPECT_FALSE(ret);
52 }
53 } // namespace NetManagerStandard
54 } // namespace OHOS