1 /* 2 * Copyright (c) 2021-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 #ifndef POWERMGR_MGR_SERVICE_NATIVE_TEST_H 17 #define POWERMGR_MGR_SERVICE_NATIVE_TEST_H 18 19 #ifdef POWER_GTEST 20 #define private public 21 #define protected public 22 #endif 23 24 #include "mock_lock_action.h" 25 #include "mock_power_action.h" 26 #include "mock_state_action.h" 27 #include "power_state_callback_stub.h" 28 #include "sensor_agent.h" 29 #include <gtest/gtest.h> 30 31 namespace OHOS { 32 namespace PowerMgr { 33 class PowerMgrServiceNativeTest : public testing::Test { 34 public: 35 void SetUp(); 36 void TearDown(); 37 }; 38 39 class PowerStateTestCallback : public PowerStateCallbackStub { 40 public: PowerStateTestCallback()41 PowerStateTestCallback() {}; ~PowerStateTestCallback()42 virtual ~PowerStateTestCallback() {}; 43 virtual void OnPowerStateChanged(PowerState state) override; 44 }; 45 } // namespace PowerMgr 46 } // namespace OHOS 47 #endif // POWERMGR_MGR_SERVICE_NATIVE_TEST_H