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 #include "i_wifi_sta_iface.h" 16 #include <gmock/gmock.h> 17 #include <gtest/gtest.h> 18 #include <cstddef> 19 #include <cstdint> 20 21 using ::testing::Return; 22 using ::testing::ext::TestSize; 23 24 namespace OHOS { 25 namespace Wifi { 26 class WifiStaIfaceTest : public testing::Test { 27 public: SetUpTestCase()28 static void SetUpTestCase(){}; TearDownTestCase()29 static void TearDownTestCase(){}; SetUp()30 virtual void SetUp(){}; TearDown()31 virtual void TearDown(){}; 32 StartScanTest()33 void StartScanTest() 34 { 35 ScanSettings *settings = nullptr; 36 StartScan(settings); 37 } 38 StartPnoScanTest()39 void StartPnoScanTest() 40 { 41 PnoScanSettings *settings = nullptr; 42 StartPnoScan(settings); 43 } 44 StartWpsPbcModeTest()45 void StartWpsPbcModeTest() 46 { 47 WifiWpsParam *param = nullptr; 48 StartWpsPbcMode(param); 49 } 50 StartWpsPinModeTest()51 void StartWpsPinModeTest() 52 { 53 WifiWpsParam *param = nullptr; 54 int *pinCode = nullptr; 55 StartWpsPinMode(param, pinCode); 56 } 57 GetRoamingCapabilitiesTest()58 void GetRoamingCapabilitiesTest() 59 { 60 WifiRoamCapability *capability = nullptr; 61 GetRoamingCapabilities(capability); 62 } 63 }; 64 HWTEST_F(WifiStaIfaceTest, StartScanTest, TestSize.Level1) 65 { 66 StartScanTest(); 67 } 68 HWTEST_F(WifiStaIfaceTest, StartPnoScanTest, TestSize.Level1) 69 { 70 StartPnoScanTest(); 71 } 72 HWTEST_F(WifiStaIfaceTest, StartWpsPbcModeTest, TestSize.Level1) 73 { 74 StartWpsPbcModeTest(); 75 } 76 HWTEST_F(WifiStaIfaceTest, StartWpsPinModeTest, TestSize.Level1) 77 { 78 StartWpsPinModeTest(); 79 } 80 HWTEST_F(WifiStaIfaceTest, GetRoamingCapabilitiesTest, TestSize.Level1) 81 { 82 GetRoamingCapabilitiesTest(); 83 } 84 } // namespace Wifi 85 } // namespace OHOS 86