mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Simplify arguments for routine objects and add a smoke test
This commit is contained in:
@@ -79,10 +79,10 @@ class Routine {
|
||||
|
||||
Routine({
|
||||
this.id,
|
||||
required this.created,
|
||||
DateTime? created,
|
||||
required this.name,
|
||||
required this.start,
|
||||
required this.end,
|
||||
DateTime? start,
|
||||
DateTime? end,
|
||||
this.fitInWeek = false,
|
||||
String? description,
|
||||
this.days = const [],
|
||||
@@ -92,6 +92,9 @@ class Routine {
|
||||
this.dayDataCurrentIterationGym = const [],
|
||||
this.logs = const [],
|
||||
}) {
|
||||
this.created = created ?? DateTime.now();
|
||||
this.start = start ?? DateTime.now();
|
||||
this.end = end ?? DateTime.now().add(const Duration(days: DEFAULT_DURATION * 7));
|
||||
this.description = description ?? '';
|
||||
}
|
||||
|
||||
|
||||
@@ -9,11 +9,19 @@ part of 'routine.dart';
|
||||
Routine _$RoutineFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(
|
||||
json,
|
||||
requiredKeys: const ['id', 'created', 'name', 'description', 'fit_in_week', 'start', 'end'],
|
||||
requiredKeys: const [
|
||||
'id',
|
||||
'created',
|
||||
'name',
|
||||
'description',
|
||||
'fit_in_week',
|
||||
'start',
|
||||
'end'
|
||||
],
|
||||
);
|
||||
return Routine(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
created: DateTime.parse(json['created'] as String),
|
||||
created: json['created'],
|
||||
name: json['name'] as String,
|
||||
start: DateTime.parse(json['start'] as String),
|
||||
end: DateTime.parse(json['end'] as String),
|
||||
|
||||
@@ -34,7 +34,8 @@ class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse {
|
||||
class _FakeStreamedResponse_1 extends _i1.SmartFake
|
||||
implements _i2.StreamedResponse {
|
||||
_FakeStreamedResponse_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -254,12 +255,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
) as _i3.Future<_i6.Uint8List>);
|
||||
|
||||
@override
|
||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod(
|
||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
|
||||
returnValue:
|
||||
_i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -34,7 +34,8 @@ import 'package:wger/providers/user.dart' as _i15;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -87,7 +88,8 @@ class _FakeAlias_4 extends _i1.SmartFake implements _i6.Alias {
|
||||
/// A class which mocks [AddExerciseProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockAddExerciseProvider extends _i1.Mock implements _i7.AddExerciseProvider {
|
||||
class MockAddExerciseProvider extends _i1.Mock
|
||||
implements _i7.AddExerciseProvider {
|
||||
MockAddExerciseProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -376,7 +378,8 @@ class MockAddExerciseProvider extends _i1.Mock implements _i7.AddExerciseProvide
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i4.Translation> addExerciseTranslation(_i4.Translation? exercise) =>
|
||||
_i13.Future<_i4.Translation> addExerciseTranslation(
|
||||
_i4.Translation? exercise) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExerciseTranslation,
|
||||
|
||||
@@ -25,7 +25,8 @@ import 'package:wger/providers/measurement.dart' as _i4;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -35,7 +36,8 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvi
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeMeasurementCategory_1 extends _i1.SmartFake implements _i3.MeasurementCategory {
|
||||
class _FakeMeasurementCategory_1 extends _i1.SmartFake
|
||||
implements _i3.MeasurementCategory {
|
||||
_FakeMeasurementCategory_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -48,7 +50,8 @@ class _FakeMeasurementCategory_1 extends _i1.SmartFake implements _i3.Measuremen
|
||||
/// A class which mocks [MeasurementProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvider {
|
||||
class MockMeasurementProvider extends _i1.Mock
|
||||
implements _i4.MeasurementProvider {
|
||||
MockMeasurementProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -129,7 +132,8 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) => (super.noSuchMethod(
|
||||
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addCategory,
|
||||
[category],
|
||||
|
||||
@@ -29,7 +29,8 @@ import 'package:wger/providers/nutrition.dart' as _i8;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -39,7 +40,8 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvi
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeIngredientDatabase_1 extends _i1.SmartFake implements _i3.IngredientDatabase {
|
||||
class _FakeIngredientDatabase_1 extends _i1.SmartFake
|
||||
implements _i3.IngredientDatabase {
|
||||
_FakeIngredientDatabase_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -49,7 +51,8 @@ class _FakeIngredientDatabase_1 extends _i1.SmartFake implements _i3.IngredientD
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_2 extends _i1.SmartFake implements _i4.NutritionalPlan {
|
||||
class _FakeNutritionalPlan_2 extends _i1.SmartFake
|
||||
implements _i4.NutritionalPlan {
|
||||
_FakeNutritionalPlan_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -92,7 +95,8 @@ class _FakeIngredient_5 extends _i1.SmartFake implements _i7.Ingredient {
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansProvider {
|
||||
class MockNutritionPlansProvider extends _i1.Mock
|
||||
implements _i8.NutritionPlansProvider {
|
||||
MockNutritionPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -202,12 +206,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
returnValue:
|
||||
_i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
@@ -217,12 +223,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
) as _i9.Future<_i4.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
returnValue:
|
||||
_i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
@@ -232,12 +240,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
) as _i9.Future<_i4.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => (super.noSuchMethod(
|
||||
_i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
returnValue:
|
||||
_i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
@@ -342,7 +352,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
) as _i9.Future<_i6.MealItem>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> deleteMealItem(_i6.MealItem? mealItem) => (super.noSuchMethod(
|
||||
_i9.Future<void> deleteMealItem(_i6.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
@@ -412,7 +423,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
) as _i9.Future<List<_i10.IngredientApiSearchEntry>>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
|
||||
_i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithCode,
|
||||
[code],
|
||||
@@ -467,7 +479,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
_i9.Future<void> fetchAndSetLogs(_i4.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
|
||||
@@ -29,7 +29,8 @@ import 'package:wger/providers/nutrition.dart' as _i8;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -39,7 +40,8 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvi
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeIngredientDatabase_1 extends _i1.SmartFake implements _i3.IngredientDatabase {
|
||||
class _FakeIngredientDatabase_1 extends _i1.SmartFake
|
||||
implements _i3.IngredientDatabase {
|
||||
_FakeIngredientDatabase_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -49,7 +51,8 @@ class _FakeIngredientDatabase_1 extends _i1.SmartFake implements _i3.IngredientD
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_2 extends _i1.SmartFake implements _i4.NutritionalPlan {
|
||||
class _FakeNutritionalPlan_2 extends _i1.SmartFake
|
||||
implements _i4.NutritionalPlan {
|
||||
_FakeNutritionalPlan_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -92,7 +95,8 @@ class _FakeIngredient_5 extends _i1.SmartFake implements _i7.Ingredient {
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansProvider {
|
||||
class MockNutritionPlansProvider extends _i1.Mock
|
||||
implements _i8.NutritionPlansProvider {
|
||||
MockNutritionPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -202,12 +206,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
returnValue:
|
||||
_i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
@@ -217,12 +223,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
) as _i9.Future<_i4.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
returnValue:
|
||||
_i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
@@ -232,12 +240,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
) as _i9.Future<_i4.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => (super.noSuchMethod(
|
||||
_i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
returnValue:
|
||||
_i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
@@ -342,7 +352,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
) as _i9.Future<_i6.MealItem>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> deleteMealItem(_i6.MealItem? mealItem) => (super.noSuchMethod(
|
||||
_i9.Future<void> deleteMealItem(_i6.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
@@ -412,7 +423,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
) as _i9.Future<List<_i10.IngredientApiSearchEntry>>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
|
||||
_i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithCode,
|
||||
[code],
|
||||
@@ -467,7 +479,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
_i9.Future<void> fetchAndSetLogs(_i4.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
|
||||
@@ -68,7 +68,8 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i3.StreamedResponse {
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake
|
||||
implements _i3.StreamedResponse {
|
||||
_FakeStreamedResponse_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -123,7 +124,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -194,7 +196,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -210,7 +213,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -275,7 +279,8 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set applicationVersion(_i6.PackageInfo? _applicationVersion) => super.noSuchMethod(
|
||||
set applicationVersion(_i6.PackageInfo? _applicationVersion) =>
|
||||
super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#applicationVersion,
|
||||
_applicationVersion,
|
||||
@@ -409,7 +414,8 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
#locale: locale,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(<String, _i2.LoginActions>{}),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(
|
||||
<String, _i2.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i2.LoginActions>>);
|
||||
|
||||
@override
|
||||
@@ -427,7 +433,8 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
serverUrl,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(<String, _i2.LoginActions>{}),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(
|
||||
<String, _i2.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i2.LoginActions>>);
|
||||
|
||||
@override
|
||||
@@ -727,12 +734,14 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
) as _i5.Future<_i10.Uint8List>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) => (super.noSuchMethod(
|
||||
_i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
returnValue:
|
||||
_i5.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -68,7 +68,8 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i2.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i2.StreamedResponse {
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake
|
||||
implements _i2.StreamedResponse {
|
||||
_FakeStreamedResponse_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -114,7 +115,8 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set applicationVersion(_i4.PackageInfo? _applicationVersion) => super.noSuchMethod(
|
||||
set applicationVersion(_i4.PackageInfo? _applicationVersion) =>
|
||||
super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#applicationVersion,
|
||||
_applicationVersion,
|
||||
@@ -248,7 +250,8 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
#locale: locale,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(<String, _i3.LoginActions>{}),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(
|
||||
<String, _i3.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i3.LoginActions>>);
|
||||
|
||||
@override
|
||||
@@ -266,7 +269,8 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
serverUrl,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(<String, _i3.LoginActions>{}),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(
|
||||
<String, _i3.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i3.LoginActions>>);
|
||||
|
||||
@override
|
||||
@@ -401,7 +405,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -472,7 +477,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -488,7 +494,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -727,12 +734,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
) as _i5.Future<_i10.Uint8List>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod(
|
||||
_i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue: _i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
returnValue:
|
||||
_i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -33,7 +33,8 @@ import 'package:wger/providers/user.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -53,7 +54,8 @@ class _FakeWeightEntry_1 extends _i1.SmartFake implements _i3.WeightEntry {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeIngredientDatabase_2 extends _i1.SmartFake implements _i4.IngredientDatabase {
|
||||
class _FakeIngredientDatabase_2 extends _i1.SmartFake
|
||||
implements _i4.IngredientDatabase {
|
||||
_FakeIngredientDatabase_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -63,7 +65,8 @@ class _FakeIngredientDatabase_2 extends _i1.SmartFake implements _i4.IngredientD
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_3 extends _i1.SmartFake implements _i5.NutritionalPlan {
|
||||
class _FakeNutritionalPlan_3 extends _i1.SmartFake
|
||||
implements _i5.NutritionalPlan {
|
||||
_FakeNutritionalPlan_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -106,7 +109,8 @@ class _FakeIngredient_6 extends _i1.SmartFake implements _i8.Ingredient {
|
||||
/// A class which mocks [BodyWeightProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockBodyWeightProvider extends _i1.Mock implements _i9.BodyWeightProvider {
|
||||
class MockBodyWeightProvider extends _i1.Mock
|
||||
implements _i9.BodyWeightProvider {
|
||||
MockBodyWeightProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -166,22 +170,26 @@ class MockBodyWeightProvider extends _i1.Mock implements _i9.BodyWeightProvider
|
||||
) as _i3.WeightEntry);
|
||||
|
||||
@override
|
||||
_i3.WeightEntry? findByDate(DateTime? date) => (super.noSuchMethod(Invocation.method(
|
||||
_i3.WeightEntry? findByDate(DateTime? date) =>
|
||||
(super.noSuchMethod(Invocation.method(
|
||||
#findByDate,
|
||||
[date],
|
||||
)) as _i3.WeightEntry?);
|
||||
|
||||
@override
|
||||
_i10.Future<List<_i3.WeightEntry>> fetchAndSetEntries() => (super.noSuchMethod(
|
||||
_i10.Future<List<_i3.WeightEntry>> fetchAndSetEntries() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEntries,
|
||||
[],
|
||||
),
|
||||
returnValue: _i10.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
returnValue:
|
||||
_i10.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
) as _i10.Future<List<_i3.WeightEntry>>);
|
||||
|
||||
@override
|
||||
_i10.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod(
|
||||
_i10.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addEntry,
|
||||
[entry],
|
||||
@@ -363,7 +371,8 @@ class MockUserProvider extends _i1.Mock implements _i12.UserProvider {
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNutritionPlansProvider extends _i1.Mock implements _i14.NutritionPlansProvider {
|
||||
class MockNutritionPlansProvider extends _i1.Mock
|
||||
implements _i14.NutritionPlansProvider {
|
||||
MockNutritionPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -473,12 +482,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i14.NutritionPlans
|
||||
) as _i10.Future<void>);
|
||||
|
||||
@override
|
||||
_i10.Future<_i5.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
_i10.Future<_i5.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i10.Future<_i5.NutritionalPlan>.value(_FakeNutritionalPlan_3(
|
||||
returnValue:
|
||||
_i10.Future<_i5.NutritionalPlan>.value(_FakeNutritionalPlan_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
@@ -488,12 +499,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i14.NutritionPlans
|
||||
) as _i10.Future<_i5.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i10.Future<_i5.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
|
||||
_i10.Future<_i5.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i10.Future<_i5.NutritionalPlan>.value(_FakeNutritionalPlan_3(
|
||||
returnValue:
|
||||
_i10.Future<_i5.NutritionalPlan>.value(_FakeNutritionalPlan_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
@@ -503,12 +516,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i14.NutritionPlans
|
||||
) as _i10.Future<_i5.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
_i10.Future<_i5.NutritionalPlan> addPlan(_i5.NutritionalPlan? planData) => (super.noSuchMethod(
|
||||
_i10.Future<_i5.NutritionalPlan> addPlan(_i5.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
returnValue: _i10.Future<_i5.NutritionalPlan>.value(_FakeNutritionalPlan_3(
|
||||
returnValue:
|
||||
_i10.Future<_i5.NutritionalPlan>.value(_FakeNutritionalPlan_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
@@ -613,7 +628,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i14.NutritionPlans
|
||||
) as _i10.Future<_i7.MealItem>);
|
||||
|
||||
@override
|
||||
_i10.Future<void> deleteMealItem(_i7.MealItem? mealItem) => (super.noSuchMethod(
|
||||
_i10.Future<void> deleteMealItem(_i7.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
@@ -683,7 +699,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i14.NutritionPlans
|
||||
) as _i10.Future<List<_i15.IngredientApiSearchEntry>>);
|
||||
|
||||
@override
|
||||
_i10.Future<_i8.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
|
||||
_i10.Future<_i8.Ingredient?> searchIngredientWithCode(String? code) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithCode,
|
||||
[code],
|
||||
@@ -738,7 +755,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i14.NutritionPlans
|
||||
) as _i10.Future<void>);
|
||||
|
||||
@override
|
||||
_i10.Future<void> fetchAndSetLogs(_i5.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
_i10.Future<void> fetchAndSetLogs(_i5.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
|
||||
@@ -71,7 +71,8 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_4 extends _i1.SmartFake
|
||||
implements _i4.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -81,7 +82,8 @@ class _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvi
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseDatabase_5 extends _i1.SmartFake implements _i5.ExerciseDatabase {
|
||||
class _FakeExerciseDatabase_5 extends _i1.SmartFake
|
||||
implements _i5.ExerciseDatabase {
|
||||
_FakeExerciseDatabase_5(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -101,7 +103,8 @@ class _FakeExercise_6 extends _i1.SmartFake implements _i6.Exercise {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseCategory_7 extends _i1.SmartFake implements _i7.ExerciseCategory {
|
||||
class _FakeExerciseCategory_7 extends _i1.SmartFake
|
||||
implements _i7.ExerciseCategory {
|
||||
_FakeExerciseCategory_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -186,7 +189,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -257,7 +261,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i11.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -273,7 +278,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i11.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -359,7 +365,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as List<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod(
|
||||
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) =>
|
||||
super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#filteredExercises,
|
||||
newFilteredExercises,
|
||||
@@ -368,7 +375,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<int, List<_i6.Exercise>> get exerciseBasesByVariation => (super.noSuchMethod(
|
||||
Map<int, List<_i6.Exercise>> get exerciseBasesByVariation =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#exerciseBasesByVariation),
|
||||
returnValue: <int, List<_i6.Exercise>>{},
|
||||
) as Map<int, List<_i6.Exercise>>);
|
||||
@@ -580,7 +588,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod(
|
||||
_i11.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetExercise,
|
||||
[exerciseId],
|
||||
@@ -614,7 +623,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod(
|
||||
_i11.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initCacheTimesLocalPrefs,
|
||||
[],
|
||||
@@ -660,7 +670,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetMuscles(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetMuscles(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetMuscles,
|
||||
[database],
|
||||
@@ -670,7 +681,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetCategories(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetCategories(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategories,
|
||||
[database],
|
||||
@@ -680,7 +692,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetLanguages(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetLanguages(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLanguages,
|
||||
[database],
|
||||
@@ -690,7 +703,8 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetEquipments(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
_i11.Future<void> fetchAndSetEquipments(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEquipments,
|
||||
[database],
|
||||
|
||||
@@ -35,7 +35,8 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -55,7 +56,8 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -115,7 +117,8 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -314,7 +317,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -329,7 +333,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -344,7 +349,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -391,7 +397,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i13.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i13.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -521,7 +528,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry) => (super.noSuchMethod(
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSlotEntry,
|
||||
[entry],
|
||||
@@ -666,12 +674,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
|
||||
72
test/workout/routine_edit_screen_test.dart
Normal file
72
test/workout/routine_edit_screen_test.dart
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (C) 2020, 2021 wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wger Workout Manager is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:mockito/annotations.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:wger/providers/routines.dart';
|
||||
import 'package:wger/screens/routine_edit_screen.dart';
|
||||
|
||||
import '../../test_data/routines.dart';
|
||||
import 'routine_edit_screen_test.mocks.dart';
|
||||
|
||||
@GenerateMocks([RoutinesProvider])
|
||||
void main() {
|
||||
final key = GlobalKey<NavigatorState>();
|
||||
|
||||
testWidgets('RoutineEditScreen smoke test', (WidgetTester tester) async {
|
||||
// Create a mock RoutinesProvider
|
||||
final mockRoutinesProvider = MockRoutinesProvider();
|
||||
when(mockRoutinesProvider.fetchAndSetRoutineFull(1)).thenAnswer((_) async => getTestRoutine());
|
||||
when(mockRoutinesProvider.findById(1)).thenReturn(getTestRoutine());
|
||||
|
||||
// Build the RoutineEditScreen widget with the correct arguments
|
||||
await tester.pumpWidget(
|
||||
ChangeNotifierProvider<RoutinesProvider>.value(
|
||||
value: mockRoutinesProvider,
|
||||
child: MaterialApp(
|
||||
locale: const Locale('en'),
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
navigatorKey: key,
|
||||
home: TextButton(
|
||||
onPressed: () => key.currentState!.push(
|
||||
MaterialPageRoute<void>(
|
||||
settings: const RouteSettings(arguments: 1),
|
||||
builder: (_) => const RoutineEditScreen(),
|
||||
),
|
||||
),
|
||||
child: const SizedBox(),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Navigate to RoutineEditScreen with the correct arguments
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.byType(TextButton));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// Verify the title is correct
|
||||
verify(mockRoutinesProvider.findById(1));
|
||||
expect(find.text('3 day workout'), findsNWidgets(2));
|
||||
});
|
||||
}
|
||||
753
test/workout/routine_edit_screen_test.mocks.dart
Normal file
753
test/workout/routine_edit_screen_test.mocks.dart
Normal file
@@ -0,0 +1,753 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in wger/test/workout/routine_edit_screen_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i9;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
_FakeWeightUnit_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine {
|
||||
_FakeRoutine_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeDay_4 extends _i1.SmartFake implements _i6.Day {
|
||||
_FakeDay_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot {
|
||||
_FakeSlot_5(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry {
|
||||
_FakeSlotEntry_6(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
_FakeBaseConfig_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i2.WgerBaseProvider get baseProvider => (super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
) as _i2.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i5.Routine> get items => (super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i5.Routine>[],
|
||||
) as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
List<_i3.WeightUnit> get weightUnits => (super.noSuchMethod(
|
||||
Invocation.getter(#weightUnits),
|
||||
returnValue: <_i3.WeightUnit>[],
|
||||
) as List<_i3.WeightUnit>);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod(
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
),
|
||||
) as _i3.WeightUnit);
|
||||
|
||||
@override
|
||||
List<_i4.RepetitionUnit> get repetitionUnits => (super.noSuchMethod(
|
||||
Invocation.getter(#repetitionUnits),
|
||||
returnValue: <_i4.RepetitionUnit>[],
|
||||
) as List<_i4.RepetitionUnit>);
|
||||
|
||||
@override
|
||||
_i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod(
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
returnValue: _FakeRepetitionUnit_2(
|
||||
this,
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
),
|
||||
) as _i4.RepetitionUnit);
|
||||
|
||||
@override
|
||||
bool get hasListeners => (super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
) as bool);
|
||||
|
||||
@override
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clear,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findWeightUnitById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#findWeightUnitById,
|
||||
[id],
|
||||
),
|
||||
),
|
||||
) as _i3.WeightUnit);
|
||||
|
||||
@override
|
||||
_i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findRepetitionUnitById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _FakeRepetitionUnit_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#findRepetitionUnitById,
|
||||
[id],
|
||||
),
|
||||
),
|
||||
) as _i4.RepetitionUnit);
|
||||
|
||||
@override
|
||||
List<_i5.Routine> getPlans() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getPlans,
|
||||
[],
|
||||
),
|
||||
returnValue: <_i5.Routine>[],
|
||||
) as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i5.Routine findById(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#findById,
|
||||
[id],
|
||||
),
|
||||
),
|
||||
) as _i5.Routine);
|
||||
|
||||
@override
|
||||
int findIndexById(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findIndexById,
|
||||
[id],
|
||||
),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
|
||||
@override
|
||||
void setCurrentPlan(int? id) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setCurrentPlan,
|
||||
[id],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void resetCurrentRoutine() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#resetCurrentRoutine,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllRoutinesFull,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
void setExercisesAndUnits(List<_i14.DayData>? entries) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editRoutine,
|
||||
[routine],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteRoutine(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteRoutine,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<Map<String, dynamic>> fetchLogData(
|
||||
_i5.Routine? workout,
|
||||
_i15.Exercise? base,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchLogData,
|
||||
[
|
||||
workout,
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i13.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRepetitionUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWeightUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetUnits,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i6.Day> addDay(
|
||||
_i6.Day? day, {
|
||||
dynamic refresh = false,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addDay,
|
||||
[day],
|
||||
{#refresh: refresh},
|
||||
),
|
||||
returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addDay,
|
||||
[day],
|
||||
{#refresh: refresh},
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDay,
|
||||
[day],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDays,
|
||||
[days],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteDay(int? dayId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteDay,
|
||||
[dayId],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSlot,
|
||||
[slot],
|
||||
),
|
||||
returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSlot,
|
||||
[slot],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlot(int? slotId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteSlot,
|
||||
[slotId],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlot(_i7.Slot? slot) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSlot,
|
||||
[slot],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSlots,
|
||||
[slots],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSlotEntry,
|
||||
[entry],
|
||||
),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSlotEntry,
|
||||
[entry],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i8.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlotEntry(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteSlotEntry,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlotEntry(_i8.SlotEntry? entry) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSlotEntry,
|
||||
[entry],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getConfigUrl,
|
||||
[type],
|
||||
),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getConfigUrl,
|
||||
[type],
|
||||
),
|
||||
),
|
||||
) as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addConfig,
|
||||
[
|
||||
config,
|
||||
type,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(
|
||||
int? id,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteConfig,
|
||||
[
|
||||
id,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
String? input,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#handleConfig,
|
||||
[
|
||||
entry,
|
||||
input,
|
||||
type,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<dynamic> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<dynamic>.value(),
|
||||
) as _i13.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addLog,
|
||||
[log],
|
||||
),
|
||||
returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addLog,
|
||||
[log],
|
||||
),
|
||||
)),
|
||||
) as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteLog(_i11.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[log],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#dispose,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#notifyListeners,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
@@ -35,7 +35,8 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -55,7 +56,8 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -115,7 +117,8 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -314,7 +317,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -329,7 +333,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -344,7 +349,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -391,7 +397,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i13.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i13.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -521,7 +528,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry) => (super.noSuchMethod(
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSlotEntry,
|
||||
[entry],
|
||||
@@ -666,12 +674,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
|
||||
@@ -108,7 +108,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -179,7 +180,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -195,7 +197,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in wger/test/workout/routine_provider_test.dart.
|
||||
// in wger/test/workout/routines_provider_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
@@ -108,7 +108,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -179,7 +180,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -195,7 +197,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -108,7 +108,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -179,7 +180,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -195,7 +197,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
|
||||
@@ -35,7 +35,8 @@ import 'package:wger/providers/routines.dart' as _i12;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -55,7 +56,8 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -115,7 +117,8 @@ class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession {
|
||||
class _FakeWorkoutSession_8 extends _i1.SmartFake
|
||||
implements _i10.WorkoutSession {
|
||||
_FakeWorkoutSession_8(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -314,7 +317,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineSparse,
|
||||
[planId],
|
||||
@@ -329,7 +333,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRoutineFull,
|
||||
[routineId],
|
||||
@@ -344,7 +349,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod(
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addRoutine,
|
||||
[routine],
|
||||
@@ -391,7 +397,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue: _i13.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i13.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i13.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -521,7 +528,8 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry) => (super.noSuchMethod(
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSlotEntry,
|
||||
[entry],
|
||||
@@ -666,12 +674,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
) as _i13.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) => (super.noSuchMethod(
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
returnValue:
|
||||
_i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
|
||||
@@ -298,6 +298,7 @@ Routine getTestRoutine({List<Exercise>? exercises}) {
|
||||
id: 1,
|
||||
created: DateTime(2021, 01, 01),
|
||||
name: '3 day workout',
|
||||
description: 'This is a 3 day workout and this text is important',
|
||||
start: DateTime(2024, 11, 01),
|
||||
end: DateTime(2024, 12, 01),
|
||||
days: [dayChestShoulders, dayLegs],
|
||||
|
||||
Reference in New Issue
Block a user