@@ -114,7 +114,7 @@ class DynamicLineToolTest {
114
114
fun testTwoVerticesCreatedAfterFirstClick () {
115
115
Assert .assertEquals(0 , tool.vertexStack.size)
116
116
117
- var firstClickCoordinate = PointF (5f , 5f )
117
+ val firstClickCoordinate = PointF (5f , 5f )
118
118
tool.handleDown(firstClickCoordinate)
119
119
tool.handleUp(firstClickCoordinate)
120
120
@@ -124,18 +124,18 @@ class DynamicLineToolTest {
124
124
@Test
125
125
@UiThreadTest
126
126
fun testLastVertexCenterChangesAfterClick () {
127
- var firstClickCoordinate = PointF (5f , 5f )
127
+ val firstClickCoordinate = PointF (5f , 5f )
128
128
tool.handleDown(firstClickCoordinate)
129
129
tool.handleUp(firstClickCoordinate)
130
130
131
- var secondClickCoordinate = PointF (100f , 100f )
131
+ val secondClickCoordinate = PointF (100f , 100f )
132
132
tool.handleDown(secondClickCoordinate)
133
133
tool.handleUp(secondClickCoordinate)
134
134
135
135
Assert .assertEquals(2 , tool.vertexStack.size)
136
136
Assert .assertEquals(secondClickCoordinate, tool.vertexStack.last.vertexCenter)
137
137
138
- var thirdClickCoordinate = PointF (200f , 200f )
138
+ val thirdClickCoordinate = PointF (200f , 200f )
139
139
tool.handleDown(thirdClickCoordinate)
140
140
tool.handleUp(thirdClickCoordinate)
141
141
@@ -146,11 +146,11 @@ class DynamicLineToolTest {
146
146
@Test
147
147
@UiThreadTest
148
148
fun testLastVertexCenterChangesAfterMove () {
149
- var firstClickCoordinate = PointF (5f , 5f )
149
+ val firstClickCoordinate = PointF (5f , 5f )
150
150
tool.handleDown(firstClickCoordinate)
151
151
tool.handleUp(firstClickCoordinate)
152
152
153
- var secondClickCoordinate = PointF (100f , 100f )
153
+ val secondClickCoordinate = PointF (100f , 100f )
154
154
tool.handleDown(secondClickCoordinate)
155
155
tool.handleUp(secondClickCoordinate)
156
156
@@ -159,7 +159,7 @@ class DynamicLineToolTest {
159
159
160
160
tool.handleDown(secondClickCoordinate)
161
161
162
- var movingCoordinate = PointF (200f , 200f )
162
+ val movingCoordinate = PointF (200f , 200f )
163
163
tool.handleMove(movingCoordinate)
164
164
tool.handleUp(movingCoordinate)
165
165
@@ -170,11 +170,11 @@ class DynamicLineToolTest {
170
170
@Test
171
171
@UiThreadTest
172
172
fun testFirstVertexCenterChangesAfterMove () {
173
- var firstClickCoordinate = PointF (5f , 5f )
173
+ val firstClickCoordinate = PointF (5f , 5f )
174
174
tool.handleDown(firstClickCoordinate)
175
175
tool.handleUp(firstClickCoordinate)
176
176
177
- var secondClickCoordinate = PointF (100f , 100f )
177
+ val secondClickCoordinate = PointF (100f , 100f )
178
178
tool.handleDown(secondClickCoordinate)
179
179
tool.handleUp(secondClickCoordinate)
180
180
@@ -183,7 +183,7 @@ class DynamicLineToolTest {
183
183
184
184
tool.handleDown(firstClickCoordinate)
185
185
186
- var movingCoordinate = PointF (200f , 200f )
186
+ val movingCoordinate = PointF (200f , 200f )
187
187
tool.handleMove(movingCoordinate)
188
188
tool.handleUp(movingCoordinate)
189
189
@@ -197,8 +197,8 @@ class DynamicLineToolTest {
197
197
var plusButtonVisibility = DynamicLineTool .topBarViewHolder?.plusButton?.visibility
198
198
Assert .assertEquals(plusButtonVisibility, View .GONE )
199
199
200
- var tapDownCoordinate = PointF (5f , 5f )
201
- var tapUpCoordinate = PointF (10f , 10f )
200
+ val tapDownCoordinate = PointF (5f , 5f )
201
+ val tapUpCoordinate = PointF (10f , 10f )
202
202
tool.handleDown(tapDownCoordinate)
203
203
tool.handleUp(tapUpCoordinate)
204
204
@@ -211,11 +211,11 @@ class DynamicLineToolTest {
211
211
fun testAddPathIsSetAfterClickingPlus () {
212
212
Assert .assertEquals(false , tool.addNewPath)
213
213
214
- var firstClickCoordinate = PointF (5f , 5f )
214
+ val firstClickCoordinate = PointF (5f , 5f )
215
215
tool.handleDown(firstClickCoordinate)
216
216
tool.handleUp(firstClickCoordinate)
217
217
218
- var secondClickCoordinate = PointF (100f , 100f )
218
+ val secondClickCoordinate = PointF (100f , 100f )
219
219
tool.handleDown(secondClickCoordinate)
220
220
tool.handleUp(secondClickCoordinate)
221
221
@@ -229,17 +229,17 @@ class DynamicLineToolTest {
229
229
fun testThreeVerticesCreatedAfterClickingPlus () {
230
230
Assert .assertEquals(0 , tool.vertexStack.size)
231
231
232
- var firstClickCoordinate = PointF (5f , 5f )
232
+ val firstClickCoordinate = PointF (5f , 5f )
233
233
tool.handleDown(firstClickCoordinate)
234
234
tool.handleUp(firstClickCoordinate)
235
235
236
- var secondClickCoordinate = PointF (100f , 100f )
236
+ val secondClickCoordinate = PointF (100f , 100f )
237
237
tool.handleDown(secondClickCoordinate)
238
238
tool.handleUp(secondClickCoordinate)
239
239
240
240
tool.onClickOnPlus()
241
241
242
- var thirdClickCoordinate = PointF (200f , 200f )
242
+ val thirdClickCoordinate = PointF (200f , 200f )
243
243
tool.handleDown(thirdClickCoordinate)
244
244
tool.handleUp(thirdClickCoordinate)
245
245
@@ -252,8 +252,8 @@ class DynamicLineToolTest {
252
252
var plusButtonVisibility = DynamicLineTool .topBarViewHolder?.plusButton?.visibility
253
253
Assert .assertEquals(plusButtonVisibility, View .GONE )
254
254
255
- var tapDownCoordinate = PointF (5f , 5f )
256
- var tapUpCoordinate = PointF (10f , 10f )
255
+ val tapDownCoordinate = PointF (5f , 5f )
256
+ val tapUpCoordinate = PointF (10f , 10f )
257
257
tool.handleDown(tapDownCoordinate)
258
258
tool.handleUp(tapUpCoordinate)
259
259
@@ -315,8 +315,8 @@ class DynamicLineToolTest {
315
315
fun testVertexStackIsClearedAfterCheckmark () {
316
316
Assert .assertEquals(0 , tool.vertexStack.size)
317
317
318
- var tapDownCoordinate = PointF (5f , 5f )
319
- var tapUpCoordinate = PointF (10f , 10f )
318
+ val tapDownCoordinate = PointF (5f , 5f )
319
+ val tapUpCoordinate = PointF (10f , 10f )
320
320
tool.handleDown(tapDownCoordinate)
321
321
tool.handleUp(tapUpCoordinate)
322
322
@@ -332,17 +332,17 @@ class DynamicLineToolTest {
332
332
Assert .assertEquals(null , tool.movingVertex)
333
333
Assert .assertEquals(null , tool.successorVertex)
334
334
335
- var firstVertexCoordinate = PointF (5f , 5f )
335
+ val firstVertexCoordinate = PointF (5f , 5f )
336
336
tool.handleDown(firstVertexCoordinate)
337
337
tool.handleUp(firstVertexCoordinate)
338
338
339
- var middleVertexCoordinate = PointF (100f , 100f )
339
+ val middleVertexCoordinate = PointF (100f , 100f )
340
340
tool.handleDown(middleVertexCoordinate)
341
341
tool.handleUp(middleVertexCoordinate)
342
342
343
343
tool.onClickOnPlus()
344
344
345
- var lastVertexCoordinate = PointF (200f , 200f )
345
+ val lastVertexCoordinate = PointF (200f , 200f )
346
346
tool.handleDown(lastVertexCoordinate)
347
347
tool.handleUp(lastVertexCoordinate)
348
348
@@ -360,17 +360,17 @@ class DynamicLineToolTest {
360
360
Assert .assertEquals(null , tool.movingVertex)
361
361
Assert .assertEquals(null , tool.successorVertex)
362
362
363
- var firstVertexCoordinate = PointF (5f , 5f )
363
+ val firstVertexCoordinate = PointF (5f , 5f )
364
364
tool.handleDown(firstVertexCoordinate)
365
365
tool.handleUp(firstVertexCoordinate)
366
366
367
- var middleVertexCoordinate = PointF (100f , 100f )
367
+ val middleVertexCoordinate = PointF (100f , 100f )
368
368
tool.handleDown(middleVertexCoordinate)
369
369
tool.handleUp(middleVertexCoordinate)
370
370
371
371
tool.onClickOnPlus()
372
372
373
- var lastVertexCoordinate = PointF (200f , 200f )
373
+ val lastVertexCoordinate = PointF (200f , 200f )
374
374
tool.handleDown(lastVertexCoordinate)
375
375
tool.handleUp(lastVertexCoordinate)
376
376
0 commit comments