• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef TEST_UNITTEST_CORE_EVENT_MOUSE_STYLE_MANAGER_TEST_NG_H
17 #define TEST_UNITTEST_CORE_EVENT_MOUSE_STYLE_MANAGER_TEST_NG_H
18 #include "gtest/gtest.h"
19 #include <string>
20 
21 #define private public
22 #define protected public
23 
24 #include "test/mock/base/mock_pixel_map.h"
25 #include "test/mock/core/common/mock_container.h"
26 #include "test/mock/core/common/mock_theme_manager.h"
27 #include "test/mock/core/pipeline/mock_pipeline_context.h"
28 #include "test/mock/core/render/mock_render_context.h"
29 
30 #include "base/mousestyle/mouse_style.h"
31 
32 namespace OHOS::Ace::NG {
33 
34 struct MockMouseFormatCase {
35     bool userSetCursor;
36     std::optional<int32_t> mouseStyleNodeId;
37     int32_t nodeId;
38     MouseFormat mouseFormat;
39     bool isByPass;
40     MouseStyleChangeReason reason;
41     bool expectSetResult;
42     MouseFormat expectMouseFormat;
43 };
44 
45 class MouseStyleManagerTestNG : public testing::Test {
46 public:
47     static void SetUpTestSuite();
48     static void TearDownTestSuite();
49     void SetUp() override;
50     void TearDown() override;
51 };
52 } // namespace OHOS::Ace::NG
53 
54 #endif //TEST_UNITTEST_CORE_EVENT_MOUSE_STYLE_MANAGER_TEST_NG_H