1 /*
2 * Copyright (C) 2022 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 #include <memory>
17 #include <gtest/gtest.h>
18
19 #include "gesture_simulation.h"
20 #include "hilog_wrapper.h"
21 #include "parcel_util.h"
22 #include "mock_gesture_simulation.h"
23
24 namespace OHOS {
25 namespace Accessibility {
GesturePathPositionDefine(float positionX,float positionY)26 GesturePathPositionDefine::GesturePathPositionDefine(float positionX, float positionY)
27 {
28 GTEST_LOG_(INFO) << "MOCK GesturePathPositionDefine";
29 }
30
GetPositionX()31 float GesturePathPositionDefine::GetPositionX()
32 {
33 GTEST_LOG_(INFO) << "MOCK GesturePathPositionDefine GetPositionX";
34 return positionX_;
35 }
36
GetPositionY()37 float GesturePathPositionDefine::GetPositionY()
38 {
39 GTEST_LOG_(INFO) << "MOCK GesturePathPositionDefine GetPositionY";
40 return positionY_;
41 }
42
SetPositionX(float positionX)43 void GesturePathPositionDefine::SetPositionX(float positionX)
44 {
45 GTEST_LOG_(INFO) << "MOCK GesturePathPositionDefine SetPositionX";
46 }
47
SetPositionY(float positionY)48 void GesturePathPositionDefine::SetPositionY(float positionY)
49 {
50 GTEST_LOG_(INFO) << "MOCK GesturePathPositionDefine SetPositionY";
51 }
52
ReadFromParcel(Parcel & parcel)53 bool GesturePathPositionDefine::ReadFromParcel(Parcel &parcel)
54 {
55 GTEST_LOG_(INFO) << "MOCK GesturePathPositionDefine ReadFromParcel";
56 return true;
57 }
58
Marshalling(Parcel & parcel) const59 bool GesturePathPositionDefine::Marshalling(Parcel &parcel) const
60 {
61 GTEST_LOG_(INFO) << "MOCK GesturePathPositionDefine Marshalling";
62 return true;
63 }
64
Unmarshalling(Parcel & parcel)65 GesturePathPositionDefine *GesturePathPositionDefine::Unmarshalling(Parcel &parcel)
66 {
67 GTEST_LOG_(INFO) << "MOCK GesturePathPositionDefine Unmarshalling";
68 return nullptr;
69 }
70
GesturePathDefine(GesturePathPositionDefine & startPosition,GesturePathPositionDefine & endPosition,int64_t durationTime)71 GesturePathDefine::GesturePathDefine(GesturePathPositionDefine &startPosition,
72 GesturePathPositionDefine &endPosition, int64_t durationTime)
73 {
74 GTEST_LOG_(INFO) << "MOCK GesturePathDefine";
75 }
76
GetDurationTime()77 int64_t GesturePathDefine::GetDurationTime()
78 {
79 GTEST_LOG_(INFO) << "MOCK GesturePathDefine GetDurationTime";
80 return durationTime_;
81 }
82
GetEndPosition()83 GesturePathPositionDefine &GesturePathDefine::GetEndPosition()
84 {
85 GTEST_LOG_(INFO) << "MOCK GesturePathDefine GetEndPosition";
86 return endPosition_;
87 }
88
GetMaxStrokeDuration()89 int64_t GesturePathDefine::GetMaxStrokeDuration()
90 {
91 GTEST_LOG_(INFO) << "MOCK GesturePathDefine GetMaxStrokeDuration";
92 return MAX_STROKE_DURATION;
93 }
94
GetMaxStrokes()95 uint32_t GesturePathDefine::GetMaxStrokes()
96 {
97 GTEST_LOG_(INFO) << "MOCK GesturePathDefine GetMaxStrokes";
98 return MAX_STROKES;
99 }
100
GetStartPosition()101 GesturePathPositionDefine &GesturePathDefine::GetStartPosition()
102 {
103 GTEST_LOG_(INFO) << "MOCK GesturePathDefine GetStartPosition";
104 return startPosition_;
105 }
106
SetDurationTime(int64_t durationTime)107 void GesturePathDefine::SetDurationTime(int64_t durationTime)
108 {
109 GTEST_LOG_(INFO) << "MOCK GesturePathDefine SetDurationTime";
110 durationTime_ = durationTime;
111 }
112
SetEndPosition(GesturePathPositionDefine & endPosition)113 void GesturePathDefine::SetEndPosition(GesturePathPositionDefine &endPosition)
114 {
115 GTEST_LOG_(INFO) << "MOCK GesturePathDefine SetEndPosition";
116 }
117
SetStartPosition(GesturePathPositionDefine & startPosition)118 void GesturePathDefine::SetStartPosition(GesturePathPositionDefine &startPosition)
119 {
120 GTEST_LOG_(INFO) << "MOCK GesturePathDefine SetStartPosition";
121 }
122
ReadFromParcel(Parcel & parcel)123 bool GesturePathDefine::ReadFromParcel(Parcel &parcel)
124 {
125 GTEST_LOG_(INFO) << "MOCK GesturePathDefine ReadFromParcel";
126 return true;
127 }
128
Marshalling(Parcel & parcel) const129 bool GesturePathDefine::Marshalling(Parcel &parcel) const
130 {
131 GTEST_LOG_(INFO) << "MOCK GesturePathDefine Marshalling";
132 return true;
133 }
134
Unmarshalling(Parcel & parcel)135 GesturePathDefine *GesturePathDefine::Unmarshalling(Parcel &parcel)
136 {
137 GTEST_LOG_(INFO) << "MOCK GesturePathDefine Unmarshalling";
138 return nullptr;
139 }
140
OnGestureInjectResult(uint32_t sequence,bool result)141 void MockGestureResultListener::OnGestureInjectResult(uint32_t sequence, bool result)
142 {
143 GTEST_LOG_(INFO) << "MOCK MockGestureResultListener OnGestureInjectResult";
144 }
145 } // namespace Accessibility
146 } // namespace OHOS
147