@@ -168,7 +168,8 @@ void main() {
168
168
),
169
169
),
170
170
);
171
- verifyNever (() => mockUserRepository.read (id: any <String >(named: 'id' )));
171
+ verifyNever (
172
+ () => mockUserRepository.read (id: any <String >(named: 'id' )));
172
173
});
173
174
174
175
// Removed the duplicated and incorrect test case above this line.
@@ -188,7 +189,8 @@ void main() {
188
189
),
189
190
),
190
191
);
191
- verifyNever (() => mockUserRepository.read (id: any <String >(named: 'id' )));
192
+ verifyNever (
193
+ () => mockUserRepository.read (id: any <String >(named: 'id' )));
192
194
});
193
195
194
196
test ('throws BadRequestException for token missing "sub" claim' ,
@@ -218,13 +220,15 @@ void main() {
218
220
),
219
221
),
220
222
);
221
- verifyNever (() => mockUserRepository.read (id: any <String >(named: 'id' )));
223
+ verifyNever (
224
+ () => mockUserRepository.read (id: any <String >(named: 'id' )));
222
225
});
223
226
224
227
test ('rethrows NotFoundException if user from token not found' , () async {
225
228
// Arrange
226
229
const exception = NotFoundException ('User not found' );
227
- when (() => mockUserRepository.read (id: testUser.id)).thenThrow (exception);
230
+ when (() => mockUserRepository.read (id: testUser.id))
231
+ .thenThrow (exception);
228
232
229
233
// Act & Assert
230
234
await expectLater (
@@ -237,7 +241,8 @@ void main() {
237
241
test ('rethrows other HtHttpException from user repository' , () async {
238
242
// Arrange
239
243
const exception = ServerException ('Database error' );
240
- when (() => mockUserRepository.read (id: testUser.id)).thenThrow (exception);
244
+ when (() => mockUserRepository.read (id: testUser.id))
245
+ .thenThrow (exception);
241
246
242
247
// Act & Assert
243
248
await expectLater (
@@ -251,7 +256,8 @@ void main() {
251
256
() async {
252
257
// Arrange
253
258
final exception = Exception ('Unexpected read error' );
254
- when (() => mockUserRepository.read (id: testUser.id)).thenThrow (exception);
259
+ when (() => mockUserRepository.read (id: testUser.id))
260
+ .thenThrow (exception);
255
261
256
262
// Act & Assert
257
263
await expectLater (
@@ -320,7 +326,8 @@ void main() {
320
326
),
321
327
),
322
328
);
323
- verifyNever (() => mockBlacklistService.blacklist (any <String >(), any <DateTime >()));
329
+ verifyNever (() =>
330
+ mockBlacklistService.blacklist (any <String >(), any <DateTime >()));
324
331
});
325
332
326
333
test ('throws InvalidInputException for token missing "jti" claim' ,
@@ -351,7 +358,8 @@ void main() {
351
358
),
352
359
),
353
360
);
354
- verifyNever (() => mockBlacklistService.blacklist (any <String >(), any <DateTime >()));
361
+ verifyNever (() =>
362
+ mockBlacklistService.blacklist (any <String >(), any <DateTime >()));
355
363
});
356
364
357
365
test ('throws InvalidInputException for token missing "exp" claim' ,
@@ -380,7 +388,8 @@ void main() {
380
388
),
381
389
),
382
390
);
383
- verifyNever (() => mockBlacklistService.blacklist (any <String >(), any <DateTime >()));
391
+ verifyNever (() =>
392
+ mockBlacklistService.blacklist (any <String >(), any <DateTime >()));
384
393
});
385
394
386
395
test ('rethrows HtHttpException from blacklist service' , () async {
0 commit comments