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 #ifndef TEST_UNITTEST_CORE_MANAGER_DRAG_ANIMATION_HELPER_TEST_NG_H
16 #define TEST_UNITTEST_CORE_MANAGER_DRAG_ANIMATION_HELPER_TEST_NG_H
17 
18 #include "test/unittest/core/pattern/test_ng.h"
19 
20 #define private public
21 #define protected public
22 #include "core/components_ng/base/view_abstract.h"
23 #include "core/components_ng/base/view_stack_processor.h"
24 #include "core/components_ng/manager/drag_drop/utils/drag_animation_helper.h"
25 #include "core/components_ng/pattern/grid/grid_pattern.h"
26 #include "core/components_ng/pattern/grid/grid_item_pattern.h"
27 #include "core/components_ng/pattern/text/text_pattern.h"
28 
29 #include "test/mock/core/common/mock_container.h"
30 #include "test/mock/core/pipeline/mock_pipeline_context.h"
31 
32 namespace OHOS::Ace::NG {
33 namespace {
34 const PanDirection DRAG_DIRECTION = { PanDirection::LEFT };
35 constexpr int32_t FINGERS_NUMBER = 2;
36 constexpr float DISTANCE = 10.5f;
37 } // namespace
38 
39 class DragAnimationHelperTestNg : public TestNG {
40 public:
41     static void SetUpTestSuite();
42     static void TearDownTestSuite();
43     void SetUp() override;
44     void TearDown() override;
45     std::pair<RefPtr<FrameNode>, std::list<RefPtr<FrameNode>>> CreateGridNodeWithChild(
46         size_t childCount, const GridItemStyle& gridItemStyle = GridItemStyle::NONE);
47 private:
48     RefPtr<FrameNode> parentNode_;
49     std::list<RefPtr<FrameNode>> childNodes_;
50 };
51 } // namespace OHOS::Ace::NG
52 
53 #endif //TEST_UNITTEST_CORE_MANAGER_DRAG_ANIMATION_HELPER_TEST_NG_H