1/*
2 * Copyright (c) 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 <gtest/gtest.h>
17#include <hdf_log.h>
18#include "../../../chip/hdi_service/iface_tool.h"
19
20using namespace testing::ext;
21using namespace OHOS::HDI::Wlan::Chip::V1_0;
22
23namespace IfaceToolTest {
24class IfaceToolTest : public testing::Test {
25public:
26    static void SetUpTestCase() {}
27    static void TearDownTestCase() {}
28    void SetUp() {}
29    void TearDown() {}
30};
31
32/**
33 * @tc.name: SetWifiUpStateTest
34 * @tc.desc: SetWifiUpState
35 * @tc.type: FUNC
36 * @tc.require:
37 */
38HWTEST_F(IfaceToolTest, SetWifiUpStateTest, TestSize.Level1)
39{
40    HDF_LOGI("SetWifiUpStateTest started");
41    std::shared_ptr<IfaceTool> ifaceTool = std::make_shared<IfaceTool>();
42    if (ifaceTool == nullptr) {
43        HDF_LOGE("ifaceTool is null");
44        return;
45    }
46    bool requestUp = true;
47    EXPECT_TRUE(ifaceTool->SetWifiUpState(requestUp));
48    requestUp = false;
49    EXPECT_TRUE(ifaceTool->SetWifiUpState(requestUp));
50}
51}