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 THERMAL_MGR_INTERFACE_TEST_H
17 #define THERMAL_MGR_INTERFACE_TEST_H
18 
19 #include <gtest/gtest.h>
20 
21 #include "ithermal_level_callback.h"
22 #include "ithermal_temp_callback.h"
23 #include "thermal_level_callback_stub.h"
24 #include "thermal_temp_callback_stub.h"
25 #include "thermal_test.h"
26 
27 namespace OHOS {
28 namespace PowerMgr {
29 class ThermalMgrInterfaceTest : public testing::Test, public ThermalTest {
30 public:
31     static void SetUpTestCase();
32     static void TearDownTestCase();
33     void TearDown();
34     void InitData();
35 
36     class ThermalTempTest1Callback : public ThermalTempCallbackStub {
37     public:
ThermalTempTest1Callback()38         ThermalTempTest1Callback() {};
~ThermalTempTest1Callback()39         virtual ~ThermalTempTest1Callback() {};
40         virtual bool OnThermalTempChanged(TempCallbackMap& tempCbMap) override;
41     };
42 
43     class ThermalTempTest2Callback : public ThermalTempCallbackStub {
44     public:
ThermalTempTest2Callback()45         ThermalTempTest2Callback() {};
~ThermalTempTest2Callback()46         virtual ~ThermalTempTest2Callback() {};
47         virtual bool OnThermalTempChanged(TempCallbackMap& tempCbMap) override;
48     };
49 
50     class ThermalLevelTest1Callback : public ThermalLevelCallbackStub {
51     public:
ThermalLevelTest1Callback()52         ThermalLevelTest1Callback() {};
~ThermalLevelTest1Callback()53         virtual ~ThermalLevelTest1Callback() {};
54         virtual bool OnThermalLevelChanged(ThermalLevel level) override;
55     };
56 
57     class ThermalLevelTest2Callback : public ThermalLevelCallbackStub {
58     public:
ThermalLevelTest2Callback()59         ThermalLevelTest2Callback() {};
~ThermalLevelTest2Callback()60         virtual ~ThermalLevelTest2Callback() {};
61         virtual bool OnThermalLevelChanged(ThermalLevel level) override;
62     };
63 
64     class ThermalLevelTest3Callback : public ThermalLevelCallbackStub {
65     public:
ThermalLevelTest3Callback()66         ThermalLevelTest3Callback() {};
~ThermalLevelTest3Callback()67         virtual ~ThermalLevelTest3Callback() {};
68         virtual bool OnThermalLevelChanged(ThermalLevel level) override;
69     };
70 
71     class ThermalLevelTest4Callback : public ThermalLevelCallbackStub {
72     public:
ThermalLevelTest4Callback()73         ThermalLevelTest4Callback() {};
~ThermalLevelTest4Callback()74         virtual ~ThermalLevelTest4Callback() {};
75         virtual bool OnThermalLevelChanged(ThermalLevel level) override;
76     };
77 
78     class ThermalLevelTest5Callback : public ThermalLevelCallbackStub {
79     public:
ThermalLevelTest5Callback()80         ThermalLevelTest5Callback() {};
~ThermalLevelTest5Callback()81         virtual ~ThermalLevelTest5Callback() {};
82         virtual bool OnThermalLevelChanged(ThermalLevel level) override;
83     };
84 };
85 } // namespace PowerMgr
86 } // namespace OHOS
87 #endif // THERMAL_MGR_INTERFACE_TEST_H
88