• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-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 THERMAL_ACTION_HUB_TEST_H
17 #define THERMAL_ACTION_HUB_TEST_H
18 
19 #include <gtest/gtest.h>
20 
21 #include "ithermal_action_callback.h"
22 #include "thermal_action_callback_stub.h"
23 #include "thermal_test.h"
24 
25 
26 namespace OHOS {
27 namespace PowerMgr {
28 class ThermalActionHubTest : public testing::Test, public ThermalTest {
29 public:
30     void TearDown();
31     void InitData();
32 
33     class ThermalActionTest1Callback : public ThermalActionCallbackStub {
34     public:
ThermalActionTest1Callback()35         ThermalActionTest1Callback() {};
~ThermalActionTest1Callback()36         virtual ~ThermalActionTest1Callback() {};
37         virtual bool OnThermalActionChanged(ActionCallbackMap& actionCbMap) override;
38     };
39 
40     class ThermalActionTest2Callback : public ThermalActionCallbackStub {
41     public:
ThermalActionTest2Callback()42         ThermalActionTest2Callback() {};
~ThermalActionTest2Callback()43         virtual ~ThermalActionTest2Callback() {};
44         virtual bool OnThermalActionChanged(ActionCallbackMap& actionCbMap) override;
45     };
46 
47     class ThermalActionTest3Callback : public ThermalActionCallbackStub {
48     public:
ThermalActionTest3Callback()49         ThermalActionTest3Callback() {};
~ThermalActionTest3Callback()50         virtual ~ThermalActionTest3Callback() {};
51         virtual bool OnThermalActionChanged(ActionCallbackMap& actionCbMap) override;
52     };
53 
54     class ThermalActionTest4Callback : public ThermalActionCallbackStub {
55     public:
ThermalActionTest4Callback()56         ThermalActionTest4Callback() {};
~ThermalActionTest4Callback()57         virtual ~ThermalActionTest4Callback() {};
58         virtual bool OnThermalActionChanged(ActionCallbackMap& actionCbMap) override;
59     };
60 
61     class ThermalActionTest5Callback : public ThermalActionCallbackStub {
62     public:
ThermalActionTest5Callback()63         ThermalActionTest5Callback() {};
~ThermalActionTest5Callback()64         virtual ~ThermalActionTest5Callback() {};
65         virtual bool OnThermalActionChanged(ActionCallbackMap& actionCbMap) override;
66     };
67 
68     class ThermalActionTest6Callback : public ThermalActionCallbackStub {
69     public:
ThermalActionTest6Callback()70         ThermalActionTest6Callback() {};
~ThermalActionTest6Callback()71         virtual ~ThermalActionTest6Callback() {};
72         virtual bool OnThermalActionChanged(ActionCallbackMap& actionCbMap) override;
73     };
74 
75     class ThermalActionTest7Callback : public ThermalActionCallbackStub {
76     public:
77         ThermalActionTest7Callback() = default;
78         virtual ~ThermalActionTest7Callback() = default;
79         virtual bool OnThermalActionChanged(ActionCallbackMap& actionCbMap) override;
80     };
81 
82     class ThermalActionTest8Callback : public ThermalActionCallbackStub {
83     public:
84         ThermalActionTest8Callback() = default;
85         virtual ~ThermalActionTest8Callback() = default;
86         virtual bool OnThermalActionChanged(ActionCallbackMap& actionCbMap) override;
87     };
88 };
89 } // namespace PowerMgr
90 } // namespace OHOS
91 #endif // THERMAL_ACTION_HUB_TEST_H
92