@@ -25,7 +25,6 @@ import ru.mystamps.web.tests.DateUtils
25
25
import ru.mystamps.web.tests.Random
26
26
import spock.lang.Specification
27
27
28
- @SuppressWarnings ([' ClassJavadoc' , ' MethodName' , ' NoDef' , ' NoTabCharacter' , ' TrailingWhitespace' ])
29
28
class UserServiceImplTest extends Specification {
30
29
31
30
private final UserDao userDao = Mock ()
@@ -78,7 +77,6 @@ class UserServiceImplTest extends Specification {
78
77
1 * userDao. add(_ as AddUserDbDto ) >> Random . userId()
79
78
}
80
79
81
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
82
80
def " registerUser() should delete registration request" () {
83
81
given :
84
82
String expectedActivationKey = activationForm. activationKey
@@ -114,7 +112,6 @@ class UserServiceImplTest extends Specification {
114
112
0 * usersActivationService. remove(_ as String )
115
113
}
116
114
117
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
118
115
def " registerUser() should pass name to dao" () {
119
116
given :
120
117
String expectedUserName = activationForm. name
@@ -127,7 +124,6 @@ class UserServiceImplTest extends Specification {
127
124
}) >> Random . userId()
128
125
}
129
126
130
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
131
127
def " registerUser() should pass login instead of name when name is null" () {
132
128
given :
133
129
String expectedUserLogin = activationForm. login
@@ -141,7 +137,6 @@ class UserServiceImplTest extends Specification {
141
137
}) >> Random . userId()
142
138
}
143
139
144
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
145
140
def " registerUser() should pass login instead of name when name is empty" () {
146
141
given :
147
142
String expectedUserLogin = activationForm. login
@@ -156,7 +151,6 @@ class UserServiceImplTest extends Specification {
156
151
}) >> Random . userId()
157
152
}
158
153
159
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
160
154
def " registerUser() should fill role field" () {
161
155
when :
162
156
service. registerUser(activationForm)
@@ -167,7 +161,6 @@ class UserServiceImplTest extends Specification {
167
161
}) >> Random . userId()
168
162
}
169
163
170
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
171
164
def " registerUser() should use email from registration request" () {
172
165
given :
173
166
UsersActivationDto activation
= new UsersActivationDto (
' [email protected] ' ,
new Date ())
@@ -182,7 +175,6 @@ class UserServiceImplTest extends Specification {
182
175
}) >> Random . userId()
183
176
}
184
177
185
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
186
178
def " registerUser() should use registration date from registration request" () {
187
179
given :
188
180
UsersActivationDto activation = new UsersActivationDto (TestObjects . TEST_EMAIL , new Date (86 , 8 , 12 ))
@@ -207,7 +199,6 @@ class UserServiceImplTest extends Specification {
207
199
ex. message == ' Password must be non null'
208
200
}
209
201
210
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
211
202
def " registerUser() should gets hash from encoder" () {
212
203
given :
213
204
String expectedHash = TestObjects . createAddUserDbDto(). hash
@@ -245,7 +236,6 @@ class UserServiceImplTest extends Specification {
245
236
ex. message == ' Login must be non null'
246
237
}
247
238
248
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
249
239
def " registerUser() should pass login to dao" () {
250
240
given :
251
241
String expectedUserLogin = activationForm. login
@@ -258,7 +248,6 @@ class UserServiceImplTest extends Specification {
258
248
}) >> Random . userId()
259
249
}
260
250
261
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
262
251
def " registerUser() should assign activated at to current date" () {
263
252
when :
264
253
service. registerUser(activationForm)
@@ -269,7 +258,6 @@ class UserServiceImplTest extends Specification {
269
258
}) >> Random . userId()
270
259
}
271
260
272
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
273
261
def " registerUser() should create collection for user" () {
274
262
given :
275
263
Integer expectedId = 909
@@ -357,7 +345,6 @@ class UserServiceImplTest extends Specification {
357
345
ex. message == ' Date must be non null'
358
346
}
359
347
360
- @SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
361
348
def " countRegisteredSince() should invoke dao, pass argument and return result from dao" () {
362
349
given :
363
350
Date expectedDate = new Date ()
0 commit comments