/* * Copyright (c) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "thermal_mgr_dialog_test.h" #include "action_popup.h" using namespace testing::ext; using namespace OHOS::PowerMgr; using namespace OHOS; using namespace std; void ThermalMgrDialogTest::SetUpTestCase() {} void ThermalMgrDialogTest::TearDownTestCase() {} void ThermalMgrDialogTest::SetUp() {} void ThermalMgrDialogTest::TearDown() {} namespace { /** * @tc.name: ThermalMgrDialogTest001 * @tc.desc: test pull up HighThermalDialog in StartPowerDialog * @tc.type: FUNC * @tc.require: issueissueI5I9BF */ HWTEST_F(ThermalMgrDialogTest, ThermalMgrDialogTest001, TestSize.Level0) { auto popup = std::make_unique("Start HighThermal Dialog"); EXPECT_TRUE(popup->ShowThermalDialog(ActionPopup::TempStatus::HIGHER_TEMP)); } /** * @tc.name: ThermalMgrDialogTest002 * @tc.desc: test pull up LowThermalDialog in StartPowerDialog * @tc.type: FUNC * @tc.require: issueissueI5I9BF */ HWTEST_F(ThermalMgrDialogTest, ThermalMgrDialogTest002, TestSize.Level0) { auto popup = std::make_unique("Start LowThermal Dialog"); EXPECT_TRUE(popup->ShowThermalDialog(ActionPopup::TempStatus::LOWER_TEMP)); } } // namespace