1 /* 2 * Copyright (C) 2023 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 "wifi_hal_chba_interface_test.h" 17 #include "securec.h" 18 #include "wifi_log.h" 19 #include "wifi_hal_chba_interface.h" 20 #include "mock_wpa_ctrl.h" 21 22 #undef LOG_TAG 23 #define LOG_TAG "WifiHalChbaInterfaceTest" 24 25 using namespace testing::ext; 26 27 namespace OHOS { 28 namespace Wifi { SetUpTestCase()29void WifiHalChbaInterfaceTest::SetUpTestCase() 30 { 31 MockInitGlobalCmd(); 32 } 33 34 HWTEST_F(WifiHalChbaInterfaceTest, ChbaStartTest, TestSize.Level1) 35 { 36 LOGE("enter ChbaStartTest"); 37 EXPECT_TRUE(ChbaStart() == WIFI_HAL_SUCCESS); 38 } 39 40 HWTEST_F(WifiHalChbaInterfaceTest, ChbaStopTest, TestSize.Level1) 41 { 42 LOGE("enter ChbaStopTest"); 43 EXPECT_TRUE(ChbaStop() == WIFI_HAL_SUCCESS); 44 } 45 } // namespace Wifi 46 } // namespace OHOS