@@ -240,13 +240,13 @@ void main() {
240
240
241
241
test (
242
242
'should re-add the "removed" MeasurementCategory and relay the exception on WgerHttpException' ,
243
- () async {
243
+ () {
244
244
// arrange
245
245
when (mockWgerBaseProvider.deleteRequest (any, any)).thenThrow (WgerHttpException ('{}' ));
246
246
247
247
// act & assert
248
- expect (() async => measurementProvider. deleteCategory (tCategoryId),
249
- throwsA (isA <WgerHttpException >()));
248
+ expect (
249
+ () => measurementProvider. deleteCategory (tCategoryId), throwsA (isA <WgerHttpException >()));
250
250
expect (measurementProvider.categories, tMeasurementCategories);
251
251
});
252
252
});
@@ -279,9 +279,7 @@ void main() {
279
279
280
280
test ("should throw a NoSuchEntryException if category doesn't exist" , () {
281
281
// act & assert
282
- expect (
283
- () async =>
284
- measurementProvider.editCategory (83 , tCategoryEditedName, tCategoryEditedUnit),
282
+ expect (() => measurementProvider.editCategory (83 , tCategoryEditedName, tCategoryEditedUnit),
285
283
throwsA (isA <NoSuchEntryException >()));
286
284
});
287
285
@@ -439,7 +437,7 @@ void main() {
439
437
440
438
test ("should throw a NoSuchEntryException if the category isn't found" , () {
441
439
// act & assert
442
- expect (() async => measurementProvider.deleteEntry (tEntryId, 83 ),
440
+ expect (() => measurementProvider.deleteEntry (tEntryId, 83 ),
443
441
throwsA (isA <NoSuchEntryException >()));
444
442
});
445
443
@@ -461,7 +459,7 @@ void main() {
461
459
462
460
test (
463
461
'should re-add the "removed" MeasurementEntry and throw a WgerHttpException if the api call fails' ,
464
- () async {
462
+ () {
465
463
// arrange
466
464
final List <MeasurementCategory > tMeasurementCategories = [
467
465
MeasurementCategory (id: 1 , name: 'Strength' , unit: 'kN' , entries: [
@@ -485,7 +483,7 @@ void main() {
485
483
when (mockWgerBaseProvider.deleteRequest (any, any)).thenThrow (WgerHttpException ('{}' ));
486
484
487
485
// act & assert
488
- expect (() async => measurementProvider.deleteEntry (tEntryId, tCategoryId),
486
+ expect (() => measurementProvider.deleteEntry (tEntryId, tCategoryId),
489
487
throwsA (isA <WgerHttpException >()));
490
488
expect (measurementProvider.categories, tMeasurementCategories);
491
489
});
0 commit comments