diff --git a/lib/providers/user.dart b/lib/providers/user.dart index 567f53ef..8e6c4456 100644 --- a/lib/providers/user.dart +++ b/lib/providers/user.dart @@ -27,8 +27,10 @@ import 'package:wger/providers/base_provider.dart'; class UserProvider with ChangeNotifier { ThemeMode themeMode = ThemeMode.system; final WgerBaseProvider baseProvider; + late SharedPreferencesAsync prefs; - UserProvider(this.baseProvider) { + UserProvider(this.baseProvider, {SharedPreferencesAsync? prefs}) { + this.prefs = prefs ?? SharedPreferencesAsync(); _loadThemeMode(); } @@ -44,15 +46,18 @@ class UserProvider with ChangeNotifier { // Load theme mode from SharedPreferences Future _loadThemeMode() async { - final prefs = SharedPreferencesAsync(); final prefsDarkMode = await prefs.getBool(PREFS_USER_DARK_THEME); + print(prefsDarkMode); + if (prefsDarkMode == null) { themeMode = ThemeMode.system; } else { themeMode = prefsDarkMode ? ThemeMode.dark : ThemeMode.light; } + print(themeMode); + notifyListeners(); } @@ -61,7 +66,6 @@ class UserProvider with ChangeNotifier { themeMode = mode; // Save to SharedPreferences - final prefs = SharedPreferencesAsync(); if (themeMode == ThemeMode.system) { await prefs.remove(PREFS_USER_DARK_THEME); } else { diff --git a/test/auth/auth_screen_test.mocks.dart b/test/auth/auth_screen_test.mocks.dart index 3b46b01e..32b76b47 100644 --- a/test/auth/auth_screen_test.mocks.dart +++ b/test/auth/auth_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/auth/auth_screen_test.dart. // Do not manually edit this file. @@ -19,29 +19,19 @@ import 'package:mockito/src/dummies.dart' as _i5; // 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: must_be_immutable // 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 _FakeResponse_0 extends _i1.SmartFake implements _i2.Response { - _FakeResponse_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse { - _FakeStreamedResponse_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeStreamedResponse_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Client]. @@ -53,45 +43,25 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _i3.Future<_i2.Response> head( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, + _i3.Future<_i2.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod( + Invocation.method(#head, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method(#head, [url], {#headers: headers}), ), - )), + ), ) as _i3.Future<_i2.Response>); @override - _i3.Future<_i2.Response> get( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, + _i3.Future<_i2.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod( + Invocation.method(#get, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method(#get, [url], {#headers: headers}), ), - )), + ), ) as _i3.Future<_i2.Response>); @override @@ -105,24 +75,18 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #post, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #post, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i3.Future<_i2.Response>); @override @@ -136,24 +100,18 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #put, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #put, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i3.Future<_i2.Response>); @override @@ -167,24 +125,18 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #patch, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #patch, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i3.Future<_i2.Response>); @override @@ -198,45 +150,29 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #delete, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i3.Future<_i2.Response>); @override - _i3.Future read( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future.value(_i5.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, + _i3.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod( + Invocation.method(#read, [url], {#headers: headers}), + returnValue: _i3.Future.value( + _i5.dummyValue( + this, + Invocation.method(#read, [url], {#headers: headers}), ), - )), + ), ) as _i3.Future); @override @@ -245,35 +181,24 @@ class MockClient extends _i1.Mock implements _i2.Client { Map? headers, }) => (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), + Invocation.method(#readBytes, [url], {#headers: headers}), returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), ) as _i3.Future<_i6.Uint8List>); @override _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1( - this, - Invocation.method( - #send, - [request], + Invocation.method(#send, [request]), + returnValue: _i3.Future<_i2.StreamedResponse>.value( + _FakeStreamedResponse_1( + this, + Invocation.method(#send, [request]), ), - )), + ), ) as _i3.Future<_i2.StreamedResponse>); @override void close() => super.noSuchMethod( - Invocation.method( - #close, - [], - ), + Invocation.method(#close, []), returnValueForMissingStub: null, ); } diff --git a/test/core/settings_test.dart b/test/core/settings_test.dart index 9f665975..8a1d6ff8 100644 --- a/test/core/settings_test.dart +++ b/test/core/settings_test.dart @@ -22,6 +22,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:provider/provider.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:wger/helpers/consts.dart'; +import 'package:wger/providers/base_provider.dart'; import 'package:wger/providers/exercises.dart'; import 'package:wger/providers/nutrition.dart'; import 'package:wger/providers/user.dart'; @@ -29,10 +32,17 @@ import 'package:wger/widgets/core/settings.dart'; import 'settings_test.mocks.dart'; -@GenerateMocks([ExercisesProvider, NutritionPlansProvider, UserProvider]) +@GenerateMocks([ + ExercisesProvider, + NutritionPlansProvider, + UserProvider, + WgerBaseProvider, + SharedPreferencesAsync, +]) void main() { final mockExerciseProvider = MockExercisesProvider(); final mockNutritionProvider = MockNutritionPlansProvider(); + final mockSharedPreferences = MockSharedPreferencesAsync(); final mockUserProvider = MockUserProvider(); setUp(() { @@ -73,12 +83,34 @@ void main() { }); }); - testWidgets('Test changing the theme mode', (WidgetTester tester) async { - await tester.pumpWidget(createSettingsScreen()); - await tester.tap(find.byKey(const ValueKey('themeModeDropdown'))); - await tester.pumpAndSettle(); - await tester.tap(find.text('Always light mode')); + group('Theme settings', () { + test('Default theme is system', () async { + when(mockSharedPreferences.getBool(PREFS_USER_DARK_THEME)).thenAnswer((_) async => null); + final userProvider = await UserProvider(MockWgerBaseProvider(), prefs: mockSharedPreferences); + expect(userProvider.themeMode, ThemeMode.system); + }); - verify(mockUserProvider.setThemeMode(ThemeMode.light)); + test('Loads light theme', () async { + when(mockSharedPreferences.getBool(PREFS_USER_DARK_THEME)).thenAnswer((_) async => false); + final userProvider = await UserProvider(MockWgerBaseProvider(), prefs: mockSharedPreferences); + expect(userProvider.themeMode, ThemeMode.light); + }); + + test('Saves theme to prefs', () { + when(mockSharedPreferences.getBool(any)).thenAnswer((_) async => null); + final userProvider = UserProvider(MockWgerBaseProvider(), prefs: mockSharedPreferences); + userProvider.setThemeMode(ThemeMode.dark); + verify(mockSharedPreferences.setBool(PREFS_USER_DARK_THEME, true)).called(1); + expect(userProvider.themeMode, ThemeMode.dark); + }); + + testWidgets('Test changing the theme mode in preferences', (WidgetTester tester) async { + await tester.pumpWidget(createSettingsScreen()); + await tester.tap(find.byKey(const ValueKey('themeModeDropdown'))); + await tester.pumpAndSettle(); + await tester.tap(find.text('Always light mode')); + + verify(mockUserProvider.setThemeMode(ThemeMode.light)).called(1); + }); }); } diff --git a/test/core/settings_test.mocks.dart b/test/core/settings_test.mocks.dart index b2b7246f..4329947e 100644 --- a/test/core/settings_test.mocks.dart +++ b/test/core/settings_test.mocks.dart @@ -1,30 +1,33 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/core/settings_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i15; -import 'dart:ui' as _i16; +import 'dart:async' as _i18; +import 'dart:ui' as _i19; -import 'package:flutter/material.dart' as _i20; +import 'package:flutter/material.dart' as _i23; +import 'package:http/http.dart' as _i16; import 'package:mockito/mockito.dart' as _i1; +import 'package:shared_preferences/shared_preferences.dart' as _i14; import 'package:wger/database/exercises/exercise_database.dart' as _i3; import 'package:wger/database/ingredients/ingredients_database.dart' as _i9; import 'package:wger/models/exercises/category.dart' as _i5; import 'package:wger/models/exercises/equipment.dart' as _i6; import 'package:wger/models/exercises/exercise.dart' as _i4; -import 'package:wger/models/exercises/ingredient_api.dart' as _i18; +import 'package:wger/models/exercises/ingredient_api.dart' as _i21; import 'package:wger/models/exercises/language.dart' as _i8; import 'package:wger/models/exercises/muscle.dart' as _i7; import 'package:wger/models/nutrition/ingredient.dart' as _i13; import 'package:wger/models/nutrition/meal.dart' as _i11; import 'package:wger/models/nutrition/meal_item.dart' as _i12; import 'package:wger/models/nutrition/nutritional_plan.dart' as _i10; -import 'package:wger/models/user/profile.dart' as _i21; +import 'package:wger/models/user/profile.dart' as _i24; +import 'package:wger/providers/auth.dart' as _i15; import 'package:wger/providers/base_provider.dart' as _i2; -import 'package:wger/providers/exercises.dart' as _i14; -import 'package:wger/providers/nutrition.dart' as _i17; -import 'package:wger/providers/user.dart' as _i19; +import 'package:wger/providers/exercises.dart' as _i17; +import 'package:wger/providers/nutrition.dart' as _i20; +import 'package:wger/providers/user.dart' as _i22; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -34,135 +37,91 @@ import 'package:wger/providers/user.dart' as _i19; // 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: must_be_immutable // 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, - ); + _FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExerciseDatabase_1 extends _i1.SmartFake implements _i3.ExerciseDatabase { - _FakeExerciseDatabase_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseDatabase_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExercise_2 extends _i1.SmartFake implements _i4.Exercise { - _FakeExercise_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExercise_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeExerciseCategory_3 extends _i1.SmartFake implements _i5.ExerciseCategory { - _FakeExerciseCategory_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseCategory_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeEquipment_4 extends _i1.SmartFake implements _i6.Equipment { - _FakeEquipment_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeEquipment_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMuscle_5 extends _i1.SmartFake implements _i7.Muscle { - _FakeMuscle_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMuscle_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeLanguage_6 extends _i1.SmartFake implements _i8.Language { - _FakeLanguage_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLanguage_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeIngredientDatabase_7 extends _i1.SmartFake implements _i9.IngredientDatabase { - _FakeIngredientDatabase_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeIngredientDatabase_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeNutritionalPlan_8 extends _i1.SmartFake implements _i10.NutritionalPlan { - _FakeNutritionalPlan_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNutritionalPlan_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMeal_9 extends _i1.SmartFake implements _i11.Meal { - _FakeMeal_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMeal_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMealItem_10 extends _i1.SmartFake implements _i12.MealItem { - _FakeMealItem_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMealItem_10(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeIngredient_11 extends _i1.SmartFake implements _i13.Ingredient { - _FakeIngredient_11( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeIngredient_11(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); +} + +class _FakeSharedPreferencesAsync_12 extends _i1.SmartFake implements _i14.SharedPreferencesAsync { + _FakeSharedPreferencesAsync_12(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeAuthProvider_13 extends _i1.SmartFake implements _i15.AuthProvider { + _FakeAuthProvider_13(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeClient_14 extends _i1.SmartFake implements _i16.Client { + _FakeClient_14(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); +} + +class _FakeUri_15 extends _i1.SmartFake implements Uri { + _FakeUri_15(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); +} + +class _FakeResponse_16 extends _i1.SmartFake implements _i16.Response { + _FakeResponse_16(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [ExercisesProvider]. /// /// See the documentation for Mockito's code generation for more information. -class MockExercisesProvider extends _i1.Mock implements _i14.ExercisesProvider { +class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider { MockExercisesProvider() { _i1.throwOnMissingStub(this); } @@ -187,10 +146,7 @@ class MockExercisesProvider extends _i1.Mock implements _i14.ExercisesProvider { @override set database(_i3.ExerciseDatabase? _database) => super.noSuchMethod( - Invocation.setter( - #database, - _database, - ), + Invocation.setter(#database, _database), returnValueForMissingStub: null, ); @@ -202,10 +158,7 @@ class MockExercisesProvider extends _i1.Mock implements _i14.ExercisesProvider { @override set exercises(List<_i4.Exercise>? _exercises) => super.noSuchMethod( - Invocation.setter( - #exercises, - _exercises, - ), + Invocation.setter(#exercises, _exercises), returnValueForMissingStub: null, ); @@ -217,10 +170,7 @@ class MockExercisesProvider extends _i1.Mock implements _i14.ExercisesProvider { @override set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod( - Invocation.setter( - #filteredExercises, - newFilteredExercises, - ), + Invocation.setter(#filteredExercises, newFilteredExercises), returnValueForMissingStub: null, ); @@ -256,69 +206,46 @@ class MockExercisesProvider extends _i1.Mock implements _i14.ExercisesProvider { @override set languages(List<_i8.Language>? languages) => super.noSuchMethod( - Invocation.setter( - #languages, - languages, - ), + Invocation.setter(#languages, languages), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i15.Future setFilters(_i14.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #setFilters, - [newFilters], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future setFilters(_i17.Filters? newFilters) => (super.noSuchMethod( + Invocation.method(#setFilters, [newFilters]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override void initFilters() => super.noSuchMethod( - Invocation.method( - #initFilters, - [], - ), + Invocation.method(#initFilters, []), returnValueForMissingStub: null, ); @override - _i15.Future findByFilters() => (super.noSuchMethod( - Invocation.method( - #findByFilters, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future findByFilters() => (super.noSuchMethod( + Invocation.method(#findByFilters, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override _i4.Exercise findExerciseById(int? id) => (super.noSuchMethod( - Invocation.method( - #findExerciseById, - [id], - ), + Invocation.method(#findExerciseById, [id]), returnValue: _FakeExercise_2( this, - Invocation.method( - #findExerciseById, - [id], - ), + Invocation.method(#findExerciseById, [id]), ), ) as _i4.Exercise); @@ -338,177 +265,125 @@ class MockExercisesProvider extends _i1.Mock implements _i14.ExercisesProvider { @override _i5.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), + Invocation.method(#findCategoryById, [id]), returnValue: _FakeExerciseCategory_3( this, - Invocation.method( - #findCategoryById, - [id], - ), + Invocation.method(#findCategoryById, [id]), ), ) as _i5.ExerciseCategory); @override _i6.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method( - #findEquipmentById, - [id], - ), + Invocation.method(#findEquipmentById, [id]), returnValue: _FakeEquipment_4( this, - Invocation.method( - #findEquipmentById, - [id], - ), + Invocation.method(#findEquipmentById, [id]), ), ) as _i6.Equipment); @override _i7.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method( - #findMuscleById, - [id], - ), + Invocation.method(#findMuscleById, [id]), returnValue: _FakeMuscle_5( this, - Invocation.method( - #findMuscleById, - [id], - ), + Invocation.method(#findMuscleById, [id]), ), ) as _i7.Muscle); @override _i8.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method( - #findLanguageById, - [id], - ), + Invocation.method(#findLanguageById, [id]), returnValue: _FakeLanguage_6( this, - Invocation.method( - #findLanguageById, - [id], - ), + Invocation.method(#findLanguageById, [id]), ), ) as _i8.Language); @override - _i15.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoriesFromApi, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( + Invocation.method(#fetchAndSetCategoriesFromApi, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMusclesFromApi, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( + Invocation.method(#fetchAndSetMusclesFromApi, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipmentsFromApi, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipmentsFromApi, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguagesFromApi, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguagesFromApi, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future<_i4.Exercise> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetExercise, - [exerciseId], - ), - returnValue: _i15.Future<_i4.Exercise>.value(_FakeExercise_2( - this, - Invocation.method( - #fetchAndSetExercise, - [exerciseId], + _i18.Future<_i4.Exercise> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( + Invocation.method(#fetchAndSetExercise, [exerciseId]), + returnValue: _i18.Future<_i4.Exercise>.value( + _FakeExercise_2( + this, + Invocation.method(#fetchAndSetExercise, [exerciseId]), ), - )), - ) as _i15.Future<_i4.Exercise>); + ), + ) as _i18.Future<_i4.Exercise>); @override - _i15.Future<_i4.Exercise> handleUpdateExerciseFromApi( + _i18.Future<_i4.Exercise> handleUpdateExerciseFromApi( _i3.ExerciseDatabase? database, int? exerciseId, ) => (super.noSuchMethod( - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - returnValue: _i15.Future<_i4.Exercise>.value(_FakeExercise_2( - this, - Invocation.method( - #handleUpdateExerciseFromApi, - [ + Invocation.method(#handleUpdateExerciseFromApi, [ + database, + exerciseId, + ]), + returnValue: _i18.Future<_i4.Exercise>.value( + _FakeExercise_2( + this, + Invocation.method(#handleUpdateExerciseFromApi, [ database, exerciseId, - ], + ]), ), - )), - ) as _i15.Future<_i4.Exercise>); - - @override - _i15.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod( - Invocation.method( - #initCacheTimesLocalPrefs, - [], - {#forceInit: forceInit}, ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + ) as _i18.Future<_i4.Exercise>); @override - _i15.Future clearAllCachesAndPrefs() => (super.noSuchMethod( - Invocation.method( - #clearAllCachesAndPrefs, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod( + Invocation.method(#initCacheTimesLocalPrefs, [], { + #forceInit: forceInit, + }), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetInitialData, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future clearAllCachesAndPrefs() => (super.noSuchMethod( + Invocation.method(#clearAllCachesAndPrefs, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future setExercisesFromDatabase( + _i18.Future fetchAndSetInitialData() => (super.noSuchMethod( + Invocation.method(#fetchAndSetInitialData, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future setExercisesFromDatabase( _i3.ExerciseDatabase? database, { bool? forceDeleteCache = false, }) => @@ -518,111 +393,83 @@ class MockExercisesProvider extends _i1.Mock implements _i14.ExercisesProvider { [database], {#forceDeleteCache: forceDeleteCache}, ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future updateExerciseCache(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #updateExerciseCache, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future updateExerciseCache(_i3.ExerciseDatabase? database) => (super.noSuchMethod( + Invocation.method(#updateExerciseCache, [database]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future fetchAndSetMuscles(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMuscles, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future fetchAndSetMuscles(_i3.ExerciseDatabase? database) => (super.noSuchMethod( + Invocation.method(#fetchAndSetMuscles, [database]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future fetchAndSetCategories(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future fetchAndSetCategories(_i3.ExerciseDatabase? database) => (super.noSuchMethod( + Invocation.method(#fetchAndSetCategories, [database]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future fetchAndSetLanguages(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguages, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future fetchAndSetLanguages(_i3.ExerciseDatabase? database) => (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguages, [database]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future fetchAndSetEquipments(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipments, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future fetchAndSetEquipments(_i3.ExerciseDatabase? database) => (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipments, [database]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future> searchExercise( + _i18.Future> searchExercise( String? name, { - String? languageCode = r'en', + String? languageCode = 'en', bool? searchEnglish = false, }) => (super.noSuchMethod( Invocation.method( #searchExercise, [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, + {#languageCode: languageCode, #searchEnglish: searchEnglish}, ), - returnValue: _i15.Future>.value(<_i4.Exercise>[]), - ) as _i15.Future>); + returnValue: _i18.Future>.value( + <_i4.Exercise>[], + ), + ) as _i18.Future>); @override - void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + void addListener(_i19.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + void removeListener(_i19.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } @@ -630,7 +477,7 @@ class MockExercisesProvider extends _i1.Mock implements _i14.ExercisesProvider { /// A class which mocks [NutritionPlansProvider]. /// /// See the documentation for Mockito's code generation for more information. -class MockNutritionPlansProvider extends _i1.Mock implements _i17.NutritionPlansProvider { +class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlansProvider { MockNutritionPlansProvider() { _i1.throwOnMissingStub(this); } @@ -655,10 +502,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i17.NutritionPlans @override set database(_i9.IngredientDatabase? _database) => super.noSuchMethod( - Invocation.setter( - #database, - _database, - ), + Invocation.setter(#database, _database), returnValueForMissingStub: null, ); @@ -670,10 +514,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i17.NutritionPlans @override set ingredients(List<_i13.Ingredient>? _ingredients) => super.noSuchMethod( - Invocation.setter( - #ingredients, - _ingredients, - ), + Invocation.setter(#ingredients, _ingredients), returnValueForMissingStub: null, ); @@ -684,223 +525,143 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i17.NutritionPlans ) as List<_i10.NutritionalPlan>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override _i10.NutritionalPlan findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), returnValue: _FakeNutritionalPlan_8( this, - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), ), ) as _i10.NutritionalPlan); @override - _i11.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( - #findMealById, - [id], - )) as _i11.Meal?); + _i11.Meal? findMealById(int? id) => + (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i11.Meal?); @override - _i15.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansSparse, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansFull, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future<_i10.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i15.Future<_i10.NutritionalPlan>.value(_FakeNutritionalPlan_8( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], + _i18.Future<_i10.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i18.Future<_i10.NutritionalPlan>.value( + _FakeNutritionalPlan_8( + this, + Invocation.method(#fetchAndSetPlanSparse, [planId]), ), - )), - ) as _i15.Future<_i10.NutritionalPlan>); + ), + ) as _i18.Future<_i10.NutritionalPlan>); @override - _i15.Future<_i10.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - returnValue: _i15.Future<_i10.NutritionalPlan>.value(_FakeNutritionalPlan_8( - this, - Invocation.method( - #fetchAndSetPlanFull, - [planId], + _i18.Future<_i10.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanFull, [planId]), + returnValue: _i18.Future<_i10.NutritionalPlan>.value( + _FakeNutritionalPlan_8( + this, + Invocation.method(#fetchAndSetPlanFull, [planId]), ), - )), - ) as _i15.Future<_i10.NutritionalPlan>); + ), + ) as _i18.Future<_i10.NutritionalPlan>); @override - _i15.Future<_i10.NutritionalPlan> addPlan(_i10.NutritionalPlan? planData) => (super.noSuchMethod( - Invocation.method( - #addPlan, - [planData], - ), - returnValue: _i15.Future<_i10.NutritionalPlan>.value(_FakeNutritionalPlan_8( - this, - Invocation.method( - #addPlan, - [planData], + _i18.Future<_i10.NutritionalPlan> addPlan(_i10.NutritionalPlan? planData) => (super.noSuchMethod( + Invocation.method(#addPlan, [planData]), + returnValue: _i18.Future<_i10.NutritionalPlan>.value( + _FakeNutritionalPlan_8( + this, + Invocation.method(#addPlan, [planData]), ), - )), - ) as _i15.Future<_i10.NutritionalPlan>); - - @override - _i15.Future editPlan(_i10.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #editPlan, - [plan], ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + ) as _i18.Future<_i10.NutritionalPlan>); @override - _i15.Future deletePlan(int? id) => (super.noSuchMethod( - Invocation.method( - #deletePlan, - [id], + _i18.Future editPlan(_i10.NutritionalPlan? plan) => (super.noSuchMethod( + Invocation.method(#editPlan, [plan]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future deletePlan(int? id) => (super.noSuchMethod( + Invocation.method(#deletePlan, [id]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future<_i11.Meal> addMeal(_i11.Meal? meal, int? planId) => (super.noSuchMethod( + Invocation.method(#addMeal, [meal, planId]), + returnValue: _i18.Future<_i11.Meal>.value( + _FakeMeal_9(this, Invocation.method(#addMeal, [meal, planId])), ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + ) as _i18.Future<_i11.Meal>); @override - _i15.Future<_i11.Meal> addMeal( - _i11.Meal? meal, - int? planId, - ) => - (super.noSuchMethod( - Invocation.method( - #addMeal, - [ - meal, - planId, - ], + _i18.Future<_i11.Meal> editMeal(_i11.Meal? meal) => (super.noSuchMethod( + Invocation.method(#editMeal, [meal]), + returnValue: _i18.Future<_i11.Meal>.value( + _FakeMeal_9(this, Invocation.method(#editMeal, [meal])), ), - returnValue: _i15.Future<_i11.Meal>.value(_FakeMeal_9( - this, - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - )), - ) as _i15.Future<_i11.Meal>); + ) as _i18.Future<_i11.Meal>); @override - _i15.Future<_i11.Meal> editMeal(_i11.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #editMeal, - [meal], - ), - returnValue: _i15.Future<_i11.Meal>.value(_FakeMeal_9( - this, - Invocation.method( - #editMeal, - [meal], - ), - )), - ) as _i15.Future<_i11.Meal>); + _i18.Future deleteMeal(_i11.Meal? meal) => (super.noSuchMethod( + Invocation.method(#deleteMeal, [meal]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future deleteMeal(_i11.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #deleteMeal, - [meal], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); - - @override - _i15.Future<_i12.MealItem> addMealItem( + _i18.Future<_i12.MealItem> addMealItem( _i12.MealItem? mealItem, _i11.Meal? meal, ) => (super.noSuchMethod( - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - returnValue: _i15.Future<_i12.MealItem>.value(_FakeMealItem_10( - this, - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], + Invocation.method(#addMealItem, [mealItem, meal]), + returnValue: _i18.Future<_i12.MealItem>.value( + _FakeMealItem_10( + this, + Invocation.method(#addMealItem, [mealItem, meal]), ), - )), - ) as _i15.Future<_i12.MealItem>); - - @override - _i15.Future deleteMealItem(_i12.MealItem? mealItem) => (super.noSuchMethod( - Invocation.method( - #deleteMealItem, - [mealItem], ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + ) as _i18.Future<_i12.MealItem>); @override - _i15.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method( - #clearIngredientCache, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future deleteMealItem(_i12.MealItem? mealItem) => (super.noSuchMethod( + Invocation.method(#deleteMealItem, [mealItem]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future<_i13.Ingredient> fetchIngredient( + _i18.Future clearIngredientCache() => (super.noSuchMethod( + Invocation.method(#clearIngredientCache, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future<_i13.Ingredient> fetchIngredient( int? ingredientId, { _i9.IngredientDatabase? database, }) => @@ -910,143 +671,106 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i17.NutritionPlans [ingredientId], {#database: database}, ), - returnValue: _i15.Future<_i13.Ingredient>.value(_FakeIngredient_11( - this, - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, + returnValue: _i18.Future<_i13.Ingredient>.value( + _FakeIngredient_11( + this, + Invocation.method( + #fetchIngredient, + [ingredientId], + {#database: database}, + ), ), - )), - ) as _i15.Future<_i13.Ingredient>); - - @override - _i15.Future fetchIngredientsFromCache() => (super.noSuchMethod( - Invocation.method( - #fetchIngredientsFromCache, - [], ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + ) as _i18.Future<_i13.Ingredient>); @override - _i15.Future> searchIngredient( + _i18.Future fetchIngredientsFromCache() => (super.noSuchMethod( + Invocation.method(#fetchIngredientsFromCache, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future> searchIngredient( String? name, { - String? languageCode = r'en', + String? languageCode = 'en', bool? searchEnglish = false, }) => (super.noSuchMethod( Invocation.method( #searchIngredient, [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, + {#languageCode: languageCode, #searchEnglish: searchEnglish}, ), - returnValue: _i15.Future>.value( - <_i18.IngredientApiSearchEntry>[]), - ) as _i15.Future>); + returnValue: _i18.Future>.value( + <_i21.IngredientApiSearchEntry>[], + ), + ) as _i18.Future>); @override - _i15.Future<_i13.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod( - Invocation.method( - #searchIngredientWithCode, - [code], - ), - returnValue: _i15.Future<_i13.Ingredient?>.value(), - ) as _i15.Future<_i13.Ingredient?>); + _i18.Future<_i13.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod( + Invocation.method(#searchIngredientWithCode, [code]), + returnValue: _i18.Future<_i13.Ingredient?>.value(), + ) as _i18.Future<_i13.Ingredient?>); @override - _i15.Future logMealToDiary(_i11.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #logMealToDiary, - [meal], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future logMealToDiary(_i11.Meal? meal) => (super.noSuchMethod( + Invocation.method(#logMealToDiary, [meal]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future logIngredientToDiary( + _i18.Future logIngredientToDiary( _i12.MealItem? mealItem, int? planId, [ DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method( - #logIngredientToDiary, - [ - mealItem, - planId, - dateTime, - ], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + Invocation.method(#logIngredientToDiary, [ + mealItem, + planId, + dateTime, + ]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future deleteLog( - int? logId, - int? planId, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - planId, - ], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, planId]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future fetchAndSetLogs(_i10.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLogs, - [plan], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future fetchAndSetLogs(_i10.NutritionalPlan? plan) => (super.noSuchMethod( + Invocation.method(#fetchAndSetLogs, [plan]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + void addListener(_i19.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + void removeListener(_i19.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } @@ -1054,23 +778,20 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i17.NutritionPlans /// A class which mocks [UserProvider]. /// /// See the documentation for Mockito's code generation for more information. -class MockUserProvider extends _i1.Mock implements _i19.UserProvider { +class MockUserProvider extends _i1.Mock implements _i22.UserProvider { MockUserProvider() { _i1.throwOnMissingStub(this); } @override - _i20.ThemeMode get themeMode => (super.noSuchMethod( + _i23.ThemeMode get themeMode => (super.noSuchMethod( Invocation.getter(#themeMode), - returnValue: _i20.ThemeMode.system, - ) as _i20.ThemeMode); + returnValue: _i23.ThemeMode.system, + ) as _i23.ThemeMode); @override - set themeMode(_i20.ThemeMode? _themeMode) => super.noSuchMethod( - Invocation.setter( - #themeMode, - _themeMode, - ), + set themeMode(_i23.ThemeMode? _themeMode) => super.noSuchMethod( + Invocation.setter(#themeMode, _themeMode), returnValueForMissingStub: null, ); @@ -1084,101 +805,306 @@ class MockUserProvider extends _i1.Mock implements _i19.UserProvider { ) as _i2.WgerBaseProvider); @override - set profile(_i21.Profile? _profile) => super.noSuchMethod( - Invocation.setter( - #profile, - _profile, + _i14.SharedPreferencesAsync get prefs => (super.noSuchMethod( + Invocation.getter(#prefs), + returnValue: _FakeSharedPreferencesAsync_12( + this, + Invocation.getter(#prefs), ), + ) as _i14.SharedPreferencesAsync); + + @override + set prefs(_i14.SharedPreferencesAsync? _prefs) => super.noSuchMethod( + Invocation.setter(#prefs, _prefs), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + set profile(_i24.Profile? _profile) => super.noSuchMethod( + Invocation.setter(#profile, _profile), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override - void setThemeMode(_i20.ThemeMode? mode) => super.noSuchMethod( - Invocation.method( - #setThemeMode, - [mode], - ), + void setThemeMode(_i23.ThemeMode? mode) => super.noSuchMethod( + Invocation.method(#setThemeMode, [mode]), returnValueForMissingStub: null, ); @override - _i15.Future fetchAndSetProfile() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetProfile, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future fetchAndSetProfile() => (super.noSuchMethod( + Invocation.method(#fetchAndSetProfile, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future saveProfile() => (super.noSuchMethod( - Invocation.method( - #saveProfile, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future saveProfile() => (super.noSuchMethod( + Invocation.method(#saveProfile, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - _i15.Future verifyEmail() => (super.noSuchMethod( - Invocation.method( - #verifyEmail, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i18.Future verifyEmail() => (super.noSuchMethod( + Invocation.method(#verifyEmail, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); @override - void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + void addListener(_i19.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + void removeListener(_i19.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } + +/// A class which mocks [WgerBaseProvider]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider { + MockWgerBaseProvider() { + _i1.throwOnMissingStub(this); + } + + @override + _i15.AuthProvider get auth => (super.noSuchMethod( + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_13(this, Invocation.getter(#auth)), + ) as _i15.AuthProvider); + + @override + set auth(_i15.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter(#auth, _auth), + returnValueForMissingStub: null, + ); + + @override + _i16.Client get client => (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeClient_14(this, Invocation.getter(#client)), + ) as _i16.Client); + + @override + set client(_i16.Client? _client) => super.noSuchMethod( + Invocation.setter(#client, _client), + returnValueForMissingStub: null, + ); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), + returnValue: {}, + ) as Map); + + @override + Uri makeUrl( + String? path, { + int? id, + String? objectMethod, + Map? query, + }) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_15( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) as Uri); + + @override + _i18.Future> fetch(Uri? uri) => (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i18.Future>.value( + {}, + ), + ) as _i18.Future>); + + @override + _i18.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i18.Future>.value([]), + ) as _i18.Future>); + + @override + _i18.Future> post( + Map? data, + Uri? uri, + ) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i18.Future>.value( + {}, + ), + ) as _i18.Future>); + + @override + _i18.Future> patch( + Map? data, + Uri? uri, + ) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i18.Future>.value( + {}, + ), + ) as _i18.Future>); + + @override + _i18.Future<_i16.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i18.Future<_i16.Response>.value( + _FakeResponse_16( + this, + Invocation.method(#deleteRequest, [url, id]), + ), + ), + ) as _i18.Future<_i16.Response>); +} + +/// A class which mocks [SharedPreferencesAsync]. +/// +/// See the documentation for Mockito's code generation for more information. +// ignore: must_be_immutable +class MockSharedPreferencesAsync extends _i1.Mock implements _i14.SharedPreferencesAsync { + MockSharedPreferencesAsync() { + _i1.throwOnMissingStub(this); + } + + @override + _i18.Future> getKeys({Set? allowList}) => (super.noSuchMethod( + Invocation.method(#getKeys, [], {#allowList: allowList}), + returnValue: _i18.Future>.value({}), + ) as _i18.Future>); + + @override + _i18.Future> getAll({Set? allowList}) => (super.noSuchMethod( + Invocation.method(#getAll, [], {#allowList: allowList}), + returnValue: _i18.Future>.value( + {}, + ), + ) as _i18.Future>); + + @override + _i18.Future getBool(String? key) => (super.noSuchMethod( + Invocation.method(#getBool, [key]), + returnValue: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future getInt(String? key) => (super.noSuchMethod( + Invocation.method(#getInt, [key]), + returnValue: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future getDouble(String? key) => (super.noSuchMethod( + Invocation.method(#getDouble, [key]), + returnValue: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future getString(String? key) => (super.noSuchMethod( + Invocation.method(#getString, [key]), + returnValue: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future?> getStringList(String? key) => (super.noSuchMethod( + Invocation.method(#getStringList, [key]), + returnValue: _i18.Future?>.value(), + ) as _i18.Future?>); + + @override + _i18.Future containsKey(String? key) => (super.noSuchMethod( + Invocation.method(#containsKey, [key]), + returnValue: _i18.Future.value(false), + ) as _i18.Future); + + @override + _i18.Future setBool(String? key, bool? value) => (super.noSuchMethod( + Invocation.method(#setBool, [key, value]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future setInt(String? key, int? value) => (super.noSuchMethod( + Invocation.method(#setInt, [key, value]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future setDouble(String? key, double? value) => (super.noSuchMethod( + Invocation.method(#setDouble, [key, value]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future setString(String? key, String? value) => (super.noSuchMethod( + Invocation.method(#setString, [key, value]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future setStringList(String? key, List? value) => (super.noSuchMethod( + Invocation.method(#setStringList, [key, value]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future remove(String? key) => (super.noSuchMethod( + Invocation.method(#remove, [key]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); + + @override + _i18.Future clear({Set? allowList}) => (super.noSuchMethod( + Invocation.method(#clear, [], {#allowList: allowList}), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); +} diff --git a/test/exercises/contribute_exercise_test.mocks.dart b/test/exercises/contribute_exercise_test.mocks.dart index 7b04e5ae..b1e42967 100644 --- a/test/exercises/contribute_exercise_test.mocks.dart +++ b/test/exercises/contribute_exercise_test.mocks.dart @@ -1,26 +1,27 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/exercises/contribute_exercise_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i13; -import 'dart:io' as _i10; -import 'dart:ui' as _i14; +import 'dart:async' as _i14; +import 'dart:io' as _i11; +import 'dart:ui' as _i15; -import 'package:flutter/material.dart' as _i16; +import 'package:flutter/material.dart' as _i17; import 'package:mockito/mockito.dart' as _i1; +import 'package:shared_preferences/shared_preferences.dart' as _i7; import 'package:wger/models/exercises/alias.dart' as _i6; -import 'package:wger/models/exercises/category.dart' as _i9; -import 'package:wger/models/exercises/equipment.dart' as _i11; +import 'package:wger/models/exercises/category.dart' as _i10; +import 'package:wger/models/exercises/equipment.dart' as _i12; import 'package:wger/models/exercises/exercise.dart' as _i3; -import 'package:wger/models/exercises/language.dart' as _i8; -import 'package:wger/models/exercises/muscle.dart' as _i12; +import 'package:wger/models/exercises/language.dart' as _i9; +import 'package:wger/models/exercises/muscle.dart' as _i13; import 'package:wger/models/exercises/translation.dart' as _i4; import 'package:wger/models/exercises/variation.dart' as _i5; -import 'package:wger/models/user/profile.dart' as _i17; -import 'package:wger/providers/add_exercise.dart' as _i7; +import 'package:wger/models/user/profile.dart' as _i18; +import 'package:wger/providers/add_exercise.dart' as _i8; import 'package:wger/providers/base_provider.dart' as _i2; -import 'package:wger/providers/user.dart' as _i15; +import 'package:wger/providers/user.dart' as _i16; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -30,65 +31,42 @@ import 'package:wger/providers/user.dart' as _i15; // 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: must_be_immutable // 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, - ); + _FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExercise_1 extends _i1.SmartFake implements _i3.Exercise { - _FakeExercise_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExercise_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeTranslation_2 extends _i1.SmartFake implements _i4.Translation { - _FakeTranslation_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeTranslation_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeVariation_3 extends _i1.SmartFake implements _i5.Variation { - _FakeVariation_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeVariation_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeAlias_4 extends _i1.SmartFake implements _i6.Alias { - _FakeAlias_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAlias_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); +} + +class _FakeSharedPreferencesAsync_5 extends _i1.SmartFake implements _i7.SharedPreferencesAsync { + _FakeSharedPreferencesAsync_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// 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 _i8.AddExerciseProvider { MockAddExerciseProvider() { _i1.throwOnMissingStub(this); } @@ -103,129 +81,91 @@ class MockAddExerciseProvider extends _i1.Mock implements _i7.AddExerciseProvide ) as _i2.WgerBaseProvider); @override - set language(_i8.Language? _language) => super.noSuchMethod( - Invocation.setter( - #language, - _language, - ), + set language(_i9.Language? _language) => super.noSuchMethod( + Invocation.setter(#language, _language), returnValueForMissingStub: null, ); @override - set category(_i9.ExerciseCategory? _category) => super.noSuchMethod( - Invocation.setter( - #category, - _category, - ), + set category(_i10.ExerciseCategory? _category) => super.noSuchMethod( + Invocation.setter(#category, _category), returnValueForMissingStub: null, ); @override - List<_i10.File> get exerciseImages => (super.noSuchMethod( + List<_i11.File> get exerciseImages => (super.noSuchMethod( Invocation.getter(#exerciseImages), - returnValue: <_i10.File>[], - ) as List<_i10.File>); + returnValue: <_i11.File>[], + ) as List<_i11.File>); @override set exerciseNameEn(String? name) => super.noSuchMethod( - Invocation.setter( - #exerciseNameEn, - name, - ), + Invocation.setter(#exerciseNameEn, name), returnValueForMissingStub: null, ); @override set exerciseNameTrans(String? name) => super.noSuchMethod( - Invocation.setter( - #exerciseNameTrans, - name, - ), + Invocation.setter(#exerciseNameTrans, name), returnValueForMissingStub: null, ); @override set descriptionEn(String? description) => super.noSuchMethod( - Invocation.setter( - #descriptionEn, - description, - ), + Invocation.setter(#descriptionEn, description), returnValueForMissingStub: null, ); @override set descriptionTrans(String? description) => super.noSuchMethod( - Invocation.setter( - #descriptionTrans, - description, - ), + Invocation.setter(#descriptionTrans, description), returnValueForMissingStub: null, ); @override set alternateNamesEn(List? names) => super.noSuchMethod( - Invocation.setter( - #alternateNamesEn, - names, - ), + Invocation.setter(#alternateNamesEn, names), returnValueForMissingStub: null, ); @override set alternateNamesTrans(List? names) => super.noSuchMethod( - Invocation.setter( - #alternateNamesTrans, - names, - ), + Invocation.setter(#alternateNamesTrans, names), returnValueForMissingStub: null, ); @override - set equipment(List<_i11.Equipment>? equipment) => super.noSuchMethod( - Invocation.setter( - #equipment, - equipment, - ), + set equipment(List<_i12.Equipment>? equipment) => super.noSuchMethod( + Invocation.setter(#equipment, equipment), returnValueForMissingStub: null, ); @override - List<_i11.Equipment> get equipment => (super.noSuchMethod( + List<_i12.Equipment> get equipment => (super.noSuchMethod( Invocation.getter(#equipment), - returnValue: <_i11.Equipment>[], - ) as List<_i11.Equipment>); + returnValue: <_i12.Equipment>[], + ) as List<_i12.Equipment>); @override - bool get newVariation => (super.noSuchMethod( - Invocation.getter(#newVariation), - returnValue: false, - ) as bool); + bool get newVariation => + (super.noSuchMethod(Invocation.getter(#newVariation), returnValue: false) as bool); @override set newVariationForExercise(int? value) => super.noSuchMethod( - Invocation.setter( - #newVariationForExercise, - value, - ), + Invocation.setter(#newVariationForExercise, value), returnValueForMissingStub: null, ); @override set variationId(int? variation) => super.noSuchMethod( - Invocation.setter( - #variationId, - variation, - ), + Invocation.setter(#variationId, variation), returnValueForMissingStub: null, ); @override _i3.Exercise get exercise => (super.noSuchMethod( Invocation.getter(#exercise), - returnValue: _FakeExercise_1( - this, - Invocation.getter(#exercise), - ), + returnValue: _FakeExercise_1(this, Invocation.getter(#exercise)), ) as _i3.Exercise); @override @@ -249,207 +189,136 @@ class MockAddExerciseProvider extends _i1.Mock implements _i7.AddExerciseProvide @override _i5.Variation get variation => (super.noSuchMethod( Invocation.getter(#variation), - returnValue: _FakeVariation_3( - this, - Invocation.getter(#variation), - ), + returnValue: _FakeVariation_3(this, Invocation.getter(#variation)), ) as _i5.Variation); @override - List<_i12.Muscle> get primaryMuscles => (super.noSuchMethod( + List<_i13.Muscle> get primaryMuscles => (super.noSuchMethod( Invocation.getter(#primaryMuscles), - returnValue: <_i12.Muscle>[], - ) as List<_i12.Muscle>); + returnValue: <_i13.Muscle>[], + ) as List<_i13.Muscle>); @override - set primaryMuscles(List<_i12.Muscle>? muscles) => super.noSuchMethod( - Invocation.setter( - #primaryMuscles, - muscles, - ), + set primaryMuscles(List<_i13.Muscle>? muscles) => super.noSuchMethod( + Invocation.setter(#primaryMuscles, muscles), returnValueForMissingStub: null, ); @override - List<_i12.Muscle> get secondaryMuscles => (super.noSuchMethod( + List<_i13.Muscle> get secondaryMuscles => (super.noSuchMethod( Invocation.getter(#secondaryMuscles), - returnValue: <_i12.Muscle>[], - ) as List<_i12.Muscle>); + returnValue: <_i13.Muscle>[], + ) as List<_i13.Muscle>); @override - set secondaryMuscles(List<_i12.Muscle>? muscles) => super.noSuchMethod( - Invocation.setter( - #secondaryMuscles, - muscles, - ), + set secondaryMuscles(List<_i13.Muscle>? muscles) => super.noSuchMethod( + Invocation.setter(#secondaryMuscles, muscles), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override - void addExerciseImages(List<_i10.File>? exercises) => super.noSuchMethod( - Invocation.method( - #addExerciseImages, - [exercises], - ), + void addExerciseImages(List<_i11.File>? exercises) => super.noSuchMethod( + Invocation.method(#addExerciseImages, [exercises]), returnValueForMissingStub: null, ); @override void removeExercise(String? path) => super.noSuchMethod( - Invocation.method( - #removeExercise, - [path], - ), + Invocation.method(#removeExercise, [path]), returnValueForMissingStub: null, ); @override void printValues() => super.noSuchMethod( - Invocation.method( - #printValues, - [], - ), + Invocation.method(#printValues, []), returnValueForMissingStub: null, ); @override - _i13.Future addExercise() => (super.noSuchMethod( - Invocation.method( - #addExercise, - [], - ), - returnValue: _i13.Future.value(0), - ) as _i13.Future); + _i14.Future addExercise() => (super.noSuchMethod( + Invocation.method(#addExercise, []), + returnValue: _i14.Future.value(0), + ) as _i14.Future); @override - _i13.Future<_i3.Exercise> addExerciseBase() => (super.noSuchMethod( - Invocation.method( - #addExerciseBase, - [], + _i14.Future<_i3.Exercise> addExerciseBase() => (super.noSuchMethod( + Invocation.method(#addExerciseBase, []), + returnValue: _i14.Future<_i3.Exercise>.value( + _FakeExercise_1(this, Invocation.method(#addExerciseBase, [])), ), - returnValue: _i13.Future<_i3.Exercise>.value(_FakeExercise_1( - this, - Invocation.method( - #addExerciseBase, - [], - ), - )), - ) as _i13.Future<_i3.Exercise>); + ) as _i14.Future<_i3.Exercise>); @override - _i13.Future<_i5.Variation> addVariation() => (super.noSuchMethod( - Invocation.method( - #addVariation, - [], + _i14.Future<_i5.Variation> addVariation() => (super.noSuchMethod( + Invocation.method(#addVariation, []), + returnValue: _i14.Future<_i5.Variation>.value( + _FakeVariation_3(this, Invocation.method(#addVariation, [])), ), - returnValue: _i13.Future<_i5.Variation>.value(_FakeVariation_3( - this, - Invocation.method( - #addVariation, - [], - ), - )), - ) as _i13.Future<_i5.Variation>); + ) as _i14.Future<_i5.Variation>); @override - _i13.Future addImages(_i3.Exercise? base) => (super.noSuchMethod( - Invocation.method( - #addImages, - [base], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i14.Future addImages(_i3.Exercise? base) => (super.noSuchMethod( + Invocation.method(#addImages, [base]), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); @override - _i13.Future<_i4.Translation> addExerciseTranslation(_i4.Translation? exercise) => - (super.noSuchMethod( - Invocation.method( - #addExerciseTranslation, - [exercise], - ), - returnValue: _i13.Future<_i4.Translation>.value(_FakeTranslation_2( - this, - Invocation.method( - #addExerciseTranslation, - [exercise], - ), - )), - ) as _i13.Future<_i4.Translation>); - - @override - _i13.Future<_i6.Alias> addExerciseAlias( - String? name, - int? exerciseId, + _i14.Future<_i4.Translation> addExerciseTranslation( + _i4.Translation? exercise, ) => (super.noSuchMethod( - Invocation.method( - #addExerciseAlias, - [ - name, - exerciseId, - ], - ), - returnValue: _i13.Future<_i6.Alias>.value(_FakeAlias_4( - this, - Invocation.method( - #addExerciseAlias, - [ - name, - exerciseId, - ], + Invocation.method(#addExerciseTranslation, [exercise]), + returnValue: _i14.Future<_i4.Translation>.value( + _FakeTranslation_2( + this, + Invocation.method(#addExerciseTranslation, [exercise]), ), - )), - ) as _i13.Future<_i6.Alias>); + ), + ) as _i14.Future<_i4.Translation>); @override - void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], + _i14.Future<_i6.Alias> addExerciseAlias(String? name, int? exerciseId) => (super.noSuchMethod( + Invocation.method(#addExerciseAlias, [name, exerciseId]), + returnValue: _i14.Future<_i6.Alias>.value( + _FakeAlias_4( + this, + Invocation.method(#addExerciseAlias, [name, exerciseId]), + ), ), + ) as _i14.Future<_i6.Alias>); + + @override + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } @@ -457,23 +326,20 @@ class MockAddExerciseProvider extends _i1.Mock implements _i7.AddExerciseProvide /// A class which mocks [UserProvider]. /// /// See the documentation for Mockito's code generation for more information. -class MockUserProvider extends _i1.Mock implements _i15.UserProvider { +class MockUserProvider extends _i1.Mock implements _i16.UserProvider { MockUserProvider() { _i1.throwOnMissingStub(this); } @override - _i16.ThemeMode get themeMode => (super.noSuchMethod( + _i17.ThemeMode get themeMode => (super.noSuchMethod( Invocation.getter(#themeMode), - returnValue: _i16.ThemeMode.system, - ) as _i16.ThemeMode); + returnValue: _i17.ThemeMode.system, + ) as _i17.ThemeMode); @override - set themeMode(_i16.ThemeMode? _themeMode) => super.noSuchMethod( - Invocation.setter( - #themeMode, - _themeMode, - ), + set themeMode(_i17.ThemeMode? _themeMode) => super.noSuchMethod( + Invocation.setter(#themeMode, _themeMode), returnValueForMissingStub: null, ); @@ -487,101 +353,84 @@ class MockUserProvider extends _i1.Mock implements _i15.UserProvider { ) as _i2.WgerBaseProvider); @override - set profile(_i17.Profile? _profile) => super.noSuchMethod( - Invocation.setter( - #profile, - _profile, + _i7.SharedPreferencesAsync get prefs => (super.noSuchMethod( + Invocation.getter(#prefs), + returnValue: _FakeSharedPreferencesAsync_5( + this, + Invocation.getter(#prefs), ), + ) as _i7.SharedPreferencesAsync); + + @override + set prefs(_i7.SharedPreferencesAsync? _prefs) => super.noSuchMethod( + Invocation.setter(#prefs, _prefs), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + set profile(_i18.Profile? _profile) => super.noSuchMethod( + Invocation.setter(#profile, _profile), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override - void setThemeMode(_i16.ThemeMode? mode) => super.noSuchMethod( - Invocation.method( - #setThemeMode, - [mode], - ), + void setThemeMode(_i17.ThemeMode? mode) => super.noSuchMethod( + Invocation.method(#setThemeMode, [mode]), returnValueForMissingStub: null, ); @override - _i13.Future fetchAndSetProfile() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetProfile, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i14.Future fetchAndSetProfile() => (super.noSuchMethod( + Invocation.method(#fetchAndSetProfile, []), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); @override - _i13.Future saveProfile() => (super.noSuchMethod( - Invocation.method( - #saveProfile, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i14.Future saveProfile() => (super.noSuchMethod( + Invocation.method(#saveProfile, []), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); @override - _i13.Future verifyEmail() => (super.noSuchMethod( - Invocation.method( - #verifyEmail, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i14.Future verifyEmail() => (super.noSuchMethod( + Invocation.method(#verifyEmail, []), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); @override - void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } diff --git a/test/gallery/gallery_form_test.mocks.dart b/test/gallery/gallery_form_test.mocks.dart index d54237c8..22fe45ce 100644 --- a/test/gallery/gallery_form_test.mocks.dart +++ b/test/gallery/gallery_form_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/gallery/gallery_form_test.dart. // Do not manually edit this file. @@ -21,49 +21,26 @@ import 'package:wger/providers/gallery.dart' as _i4; // 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: must_be_immutable // 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 _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { - _FakeAuthProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { - _FakeClient_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_2 extends _i1.SmartFake implements Uri { - _FakeUri_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response { - _FakeResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [GalleryProvider]. @@ -82,125 +59,77 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { @override set images(List<_i5.Image>? _images) => super.noSuchMethod( - Invocation.setter( - #images, - _images, - ), + Invocation.setter(#images, _images), returnValueForMissingStub: null, ); @override _i2.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), ) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter( - #auth, - _auth, - ), + Invocation.setter(#auth, _auth), returnValueForMissingStub: null, ); @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), ) as _i3.Client); @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override _i6.Future fetchAndSetGallery() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetGallery, - [], - ), + Invocation.method(#fetchAndSetGallery, []), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override - _i6.Future addImage( - _i5.Image? image, - _i7.XFile? imageFile, - ) => - (super.noSuchMethod( - Invocation.method( - #addImage, - [ - image, - imageFile, - ], - ), + _i6.Future addImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod( + Invocation.method(#addImage, [image, imageFile]), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override - _i6.Future editImage( - _i5.Image? image, - _i7.XFile? imageFile, - ) => - (super.noSuchMethod( - Invocation.method( - #editImage, - [ - image, - imageFile, - ], - ), + _i6.Future editImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod( + Invocation.method(#editImage, [image, imageFile]), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override _i6.Future deleteImage(_i5.Image? image) => (super.noSuchMethod( - Invocation.method( - #deleteImage, - [image], - ), + Invocation.method(#deleteImage, [image]), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), returnValue: {}, ) as Map); @@ -215,58 +144,39 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), ), ) as Uri); @override _i6.Future> fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], + Invocation.method(#fetch, [uri]), + returnValue: _i6.Future>.value( + {}, ), - returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override _i6.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), + Invocation.method(#fetchPaginated, [uri]), returnValue: _i6.Future>.value([]), ) as _i6.Future>); @override - _i6.Future> post( - Map? data, - Uri? uri, - ) => + _i6.Future> post(Map? data, Uri? uri) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], + Invocation.method(#post, [data, uri]), + returnValue: _i6.Future>.value( + {}, ), - returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override @@ -275,74 +185,44 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], + Invocation.method(#patch, [data, uri]), + returnValue: _i6.Future>.value( + {}, ), - returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override - _i6.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i6.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], + _i6.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i6.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#deleteRequest, [url, id]), ), - )), + ), ) as _i6.Future<_i3.Response>); @override void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } diff --git a/test/gallery/gallery_screen_test.mocks.dart b/test/gallery/gallery_screen_test.mocks.dart index fe6aebc6..8ea249dd 100644 --- a/test/gallery/gallery_screen_test.mocks.dart +++ b/test/gallery/gallery_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/gallery/gallery_screen_test.dart. // Do not manually edit this file. @@ -21,49 +21,26 @@ import 'package:wger/providers/gallery.dart' as _i4; // 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: must_be_immutable // 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 _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { - _FakeAuthProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { - _FakeClient_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_2 extends _i1.SmartFake implements Uri { - _FakeUri_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response { - _FakeResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [GalleryProvider]. @@ -82,125 +59,77 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { @override set images(List<_i5.Image>? _images) => super.noSuchMethod( - Invocation.setter( - #images, - _images, - ), + Invocation.setter(#images, _images), returnValueForMissingStub: null, ); @override _i2.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), ) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter( - #auth, - _auth, - ), + Invocation.setter(#auth, _auth), returnValueForMissingStub: null, ); @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), ) as _i3.Client); @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override _i6.Future fetchAndSetGallery() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetGallery, - [], - ), + Invocation.method(#fetchAndSetGallery, []), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override - _i6.Future addImage( - _i5.Image? image, - _i7.XFile? imageFile, - ) => - (super.noSuchMethod( - Invocation.method( - #addImage, - [ - image, - imageFile, - ], - ), + _i6.Future addImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod( + Invocation.method(#addImage, [image, imageFile]), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override - _i6.Future editImage( - _i5.Image? image, - _i7.XFile? imageFile, - ) => - (super.noSuchMethod( - Invocation.method( - #editImage, - [ - image, - imageFile, - ], - ), + _i6.Future editImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod( + Invocation.method(#editImage, [image, imageFile]), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override _i6.Future deleteImage(_i5.Image? image) => (super.noSuchMethod( - Invocation.method( - #deleteImage, - [image], - ), + Invocation.method(#deleteImage, [image]), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), returnValue: {}, ) as Map); @@ -215,58 +144,39 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), ), ) as Uri); @override _i6.Future> fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], + Invocation.method(#fetch, [uri]), + returnValue: _i6.Future>.value( + {}, ), - returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override _i6.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), + Invocation.method(#fetchPaginated, [uri]), returnValue: _i6.Future>.value([]), ) as _i6.Future>); @override - _i6.Future> post( - Map? data, - Uri? uri, - ) => + _i6.Future> post(Map? data, Uri? uri) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], + Invocation.method(#post, [data, uri]), + returnValue: _i6.Future>.value( + {}, ), - returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override @@ -275,74 +185,44 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], + Invocation.method(#patch, [data, uri]), + returnValue: _i6.Future>.value( + {}, ), - returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override - _i6.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i6.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], + _i6.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i6.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#deleteRequest, [url, id]), ), - )), + ), ) as _i6.Future<_i3.Response>); @override void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } diff --git a/test/measurements/measurement_categories_screen_test.mocks.dart b/test/measurements/measurement_categories_screen_test.mocks.dart index bcda9791..1504cf8a 100644 --- a/test/measurements/measurement_categories_screen_test.mocks.dart +++ b/test/measurements/measurement_categories_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/measurements/measurement_categories_screen_test.dart. // Do not manually edit this file. @@ -20,29 +20,20 @@ import 'package:wger/providers/measurement.dart' as _i4; // 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: must_be_immutable // 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, - ); + _FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMeasurementCategory_1 extends _i1.SmartFake implements _i3.MeasurementCategory { - _FakeMeasurementCategory_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMeasurementCategory_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [MeasurementProvider]. @@ -69,127 +60,76 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide ) as List<_i3.MeasurementCategory>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override _i3.MeasurementCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), + Invocation.method(#findCategoryById, [id]), returnValue: _FakeMeasurementCategory_1( this, - Invocation.method( - #findCategoryById, - [id], - ), + Invocation.method(#findCategoryById, [id]), ), ) as _i3.MeasurementCategory); @override _i5.Future fetchAndSetCategories() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [], - ), + Invocation.method(#fetchAndSetCategories, []), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future fetchAndSetCategoryEntries(int? id) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoryEntries, - [id], - ), + Invocation.method(#fetchAndSetCategoryEntries, [id]), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future fetchAndSetAllCategoriesAndEntries() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllCategoriesAndEntries, - [], - ), + Invocation.method(#fetchAndSetAllCategoriesAndEntries, []), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future addCategory(_i3.MeasurementCategory? category) => (super.noSuchMethod( - Invocation.method( - #addCategory, - [category], - ), + Invocation.method(#addCategory, [category]), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future deleteCategory(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteCategory, - [id], - ), + Invocation.method(#deleteCategory, [id]), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override - _i5.Future editCategory( - int? id, - String? newName, - String? newUnit, - ) => - (super.noSuchMethod( - Invocation.method( - #editCategory, - [ - id, - newName, - newUnit, - ], - ), + _i5.Future editCategory(int? id, String? newName, String? newUnit) => (super.noSuchMethod( + Invocation.method(#editCategory, [id, newName, newUnit]), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future addEntry(_i6.MeasurementEntry? entry) => (super.noSuchMethod( - Invocation.method( - #addEntry, - [entry], - ), + Invocation.method(#addEntry, [entry]), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override - _i5.Future deleteEntry( - int? id, - int? categoryId, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteEntry, - [ - id, - categoryId, - ], - ), + _i5.Future deleteEntry(int? id, int? categoryId) => (super.noSuchMethod( + Invocation.method(#deleteEntry, [id, categoryId]), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @@ -203,53 +143,38 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide DateTime? newDate, ) => (super.noSuchMethod( - Invocation.method( - #editEntry, - [ - id, - categoryId, - newValue, - newNotes, - newDate, - ], - ), + Invocation.method(#editEntry, [ + id, + categoryId, + newValue, + newNotes, + newDate, + ]), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } diff --git a/test/measurements/measurement_provider_test.mocks.dart b/test/measurements/measurement_provider_test.mocks.dart index 01aadd25..867c70f8 100644 --- a/test/measurements/measurement_provider_test.mocks.dart +++ b/test/measurements/measurement_provider_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/measurements/measurement_provider_test.dart. // Do not manually edit this file. @@ -18,49 +18,26 @@ import 'package:wger/providers/base_provider.dart' as _i4; // 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: must_be_immutable // 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 _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { - _FakeAuthProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { - _FakeClient_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_2 extends _i1.SmartFake implements Uri { - _FakeUri_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response { - _FakeResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [WgerBaseProvider]. @@ -74,46 +51,32 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { @override _i2.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), ) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter( - #auth, - _auth, - ), + Invocation.setter(#auth, _auth), returnValueForMissingStub: null, ); @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), ) as _i3.Client); @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), returnValue: {}, ) as Map); @@ -128,58 +91,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), ), ) as Uri); @override _i5.Future> fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), + Invocation.method(#fetchPaginated, [uri]), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i5.Future> post(Map? data, Uri? uri) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -188,38 +132,20 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#deleteRequest, [url, id]), ), - )), + ), ) as _i5.Future<_i3.Response>); } diff --git a/test/nutrition/nutritional_meal_form_test.mocks.dart b/test/nutrition/nutritional_meal_form_test.mocks.dart index 9ef7dd8a..bfba00ac 100644 --- a/test/nutrition/nutritional_meal_form_test.mocks.dart +++ b/test/nutrition/nutritional_meal_form_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/nutrition/nutritional_meal_form_test.dart. // Do not manually edit this file. @@ -24,69 +24,37 @@ import 'package:wger/providers/nutrition.dart' as _i8; // 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: must_be_immutable // 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, - ); + _FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeIngredientDatabase_1 extends _i1.SmartFake implements _i3.IngredientDatabase { - _FakeIngredientDatabase_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeIngredientDatabase_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeNutritionalPlan_2 extends _i1.SmartFake implements _i4.NutritionalPlan { - _FakeNutritionalPlan_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNutritionalPlan_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMeal_3 extends _i1.SmartFake implements _i5.Meal { - _FakeMeal_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMeal_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMealItem_4 extends _i1.SmartFake implements _i6.MealItem { - _FakeMealItem_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMealItem_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeIngredient_5 extends _i1.SmartFake implements _i7.Ingredient { - _FakeIngredient_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeIngredient_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [NutritionPlansProvider]. @@ -117,10 +85,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP @override set database(_i3.IngredientDatabase? _database) => super.noSuchMethod( - Invocation.setter( - #database, - _database, - ), + Invocation.setter(#database, _database), returnValueForMissingStub: null, ); @@ -132,10 +97,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP @override set ingredients(List<_i7.Ingredient>? _ingredients) => super.noSuchMethod( - Invocation.setter( - #ingredients, - _ingredients, - ), + Invocation.setter(#ingredients, _ingredients), returnValueForMissingStub: null, ); @@ -146,172 +108,108 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP ) as List<_i4.NutritionalPlan>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override _i4.NutritionalPlan findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), returnValue: _FakeNutritionalPlan_2( this, - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), ), ) as _i4.NutritionalPlan); @override - _i5.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( - #findMealById, - [id], - )) as _i5.Meal?); + _i5.Meal? findMealById(int? id) => + (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?); @override _i9.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), + Invocation.method(#fetchAndSetAllPlansSparse, []), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), + Invocation.method(#fetchAndSetAllPlansFull, []), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i9.Future<_i4.NutritionalPlan>.value( + _FakeNutritionalPlan_2( + this, + Invocation.method(#fetchAndSetPlanSparse, [planId]), ), - )), + ), ) as _i9.Future<_i4.NutritionalPlan>); @override _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( - this, - Invocation.method( - #fetchAndSetPlanFull, - [planId], + Invocation.method(#fetchAndSetPlanFull, [planId]), + returnValue: _i9.Future<_i4.NutritionalPlan>.value( + _FakeNutritionalPlan_2( + this, + Invocation.method(#fetchAndSetPlanFull, [planId]), ), - )), + ), ) as _i9.Future<_i4.NutritionalPlan>); @override _i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => (super.noSuchMethod( - Invocation.method( - #addPlan, - [planData], - ), - returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( - this, - Invocation.method( - #addPlan, - [planData], + Invocation.method(#addPlan, [planData]), + returnValue: _i9.Future<_i4.NutritionalPlan>.value( + _FakeNutritionalPlan_2( + this, + Invocation.method(#addPlan, [planData]), ), - )), + ), ) as _i9.Future<_i4.NutritionalPlan>); @override _i9.Future editPlan(_i4.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #editPlan, - [plan], - ), + Invocation.method(#editPlan, [plan]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future deletePlan(int? id) => (super.noSuchMethod( - Invocation.method( - #deletePlan, - [id], - ), + Invocation.method(#deletePlan, [id]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override - _i9.Future<_i5.Meal> addMeal( - _i5.Meal? meal, - int? planId, - ) => - (super.noSuchMethod( - Invocation.method( - #addMeal, - [ - meal, - planId, - ], + _i9.Future<_i5.Meal> addMeal(_i5.Meal? meal, int? planId) => (super.noSuchMethod( + Invocation.method(#addMeal, [meal, planId]), + returnValue: _i9.Future<_i5.Meal>.value( + _FakeMeal_3(this, Invocation.method(#addMeal, [meal, planId])), ), - returnValue: _i9.Future<_i5.Meal>.value(_FakeMeal_3( - this, - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - )), ) as _i9.Future<_i5.Meal>); @override _i9.Future<_i5.Meal> editMeal(_i5.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #editMeal, - [meal], + Invocation.method(#editMeal, [meal]), + returnValue: _i9.Future<_i5.Meal>.value( + _FakeMeal_3(this, Invocation.method(#editMeal, [meal])), ), - returnValue: _i9.Future<_i5.Meal>.value(_FakeMeal_3( - this, - Invocation.method( - #editMeal, - [meal], - ), - )), ) as _i9.Future<_i5.Meal>); @override _i9.Future deleteMeal(_i5.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #deleteMeal, - [meal], - ), + Invocation.method(#deleteMeal, [meal]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -322,41 +220,25 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP _i5.Meal? meal, ) => (super.noSuchMethod( - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - returnValue: _i9.Future<_i6.MealItem>.value(_FakeMealItem_4( - this, - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], + Invocation.method(#addMealItem, [mealItem, meal]), + returnValue: _i9.Future<_i6.MealItem>.value( + _FakeMealItem_4( + this, + Invocation.method(#addMealItem, [mealItem, meal]), ), - )), + ), ) as _i9.Future<_i6.MealItem>); @override _i9.Future deleteMealItem(_i6.MealItem? mealItem) => (super.noSuchMethod( - Invocation.method( - #deleteMealItem, - [mealItem], - ), + Invocation.method(#deleteMealItem, [mealItem]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method( - #clearIngredientCache, - [], - ), + Invocation.method(#clearIngredientCache, []), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -372,22 +254,21 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP [ingredientId], {#database: database}, ), - returnValue: _i9.Future<_i7.Ingredient>.value(_FakeIngredient_5( - this, - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, + returnValue: _i9.Future<_i7.Ingredient>.value( + _FakeIngredient_5( + this, + Invocation.method( + #fetchIngredient, + [ingredientId], + {#database: database}, + ), ), - )), + ), ) as _i9.Future<_i7.Ingredient>); @override _i9.Future fetchIngredientsFromCache() => (super.noSuchMethod( - Invocation.method( - #fetchIngredientsFromCache, - [], - ), + Invocation.method(#fetchIngredientsFromCache, []), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -395,37 +276,29 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP @override _i9.Future> searchIngredient( String? name, { - String? languageCode = r'en', + String? languageCode = 'en', bool? searchEnglish = false, }) => (super.noSuchMethod( Invocation.method( #searchIngredient, [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, + {#languageCode: languageCode, #searchEnglish: searchEnglish}, ), returnValue: _i9.Future>.value( - <_i10.IngredientApiSearchEntry>[]), + <_i10.IngredientApiSearchEntry>[], + ), ) as _i9.Future>); @override _i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod( - Invocation.method( - #searchIngredientWithCode, - [code], - ), + Invocation.method(#searchIngredientWithCode, [code]), returnValue: _i9.Future<_i7.Ingredient?>.value(), ) as _i9.Future<_i7.Ingredient?>); @override _i9.Future logMealToDiary(_i5.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #logMealToDiary, - [meal], - ), + Invocation.method(#logMealToDiary, [meal]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -437,78 +310,50 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method( - #logIngredientToDiary, - [ - mealItem, - planId, - dateTime, - ], - ), + Invocation.method(#logIngredientToDiary, [ + mealItem, + planId, + dateTime, + ]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override - _i9.Future deleteLog( - int? logId, - int? planId, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - planId, - ], - ), + _i9.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, planId]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLogs, - [plan], - ), + Invocation.method(#fetchAndSetLogs, [plan]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } diff --git a/test/nutrition/nutritional_plan_form_test.mocks.dart b/test/nutrition/nutritional_plan_form_test.mocks.dart index 702b49cd..f81cb30c 100644 --- a/test/nutrition/nutritional_plan_form_test.mocks.dart +++ b/test/nutrition/nutritional_plan_form_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/nutrition/nutritional_plan_form_test.dart. // Do not manually edit this file. @@ -24,69 +24,37 @@ import 'package:wger/providers/nutrition.dart' as _i8; // 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: must_be_immutable // 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, - ); + _FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeIngredientDatabase_1 extends _i1.SmartFake implements _i3.IngredientDatabase { - _FakeIngredientDatabase_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeIngredientDatabase_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeNutritionalPlan_2 extends _i1.SmartFake implements _i4.NutritionalPlan { - _FakeNutritionalPlan_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNutritionalPlan_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMeal_3 extends _i1.SmartFake implements _i5.Meal { - _FakeMeal_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMeal_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMealItem_4 extends _i1.SmartFake implements _i6.MealItem { - _FakeMealItem_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMealItem_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeIngredient_5 extends _i1.SmartFake implements _i7.Ingredient { - _FakeIngredient_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeIngredient_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [NutritionPlansProvider]. @@ -117,10 +85,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP @override set database(_i3.IngredientDatabase? _database) => super.noSuchMethod( - Invocation.setter( - #database, - _database, - ), + Invocation.setter(#database, _database), returnValueForMissingStub: null, ); @@ -132,10 +97,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP @override set ingredients(List<_i7.Ingredient>? _ingredients) => super.noSuchMethod( - Invocation.setter( - #ingredients, - _ingredients, - ), + Invocation.setter(#ingredients, _ingredients), returnValueForMissingStub: null, ); @@ -146,172 +108,108 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP ) as List<_i4.NutritionalPlan>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override _i4.NutritionalPlan findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), returnValue: _FakeNutritionalPlan_2( this, - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), ), ) as _i4.NutritionalPlan); @override - _i5.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( - #findMealById, - [id], - )) as _i5.Meal?); + _i5.Meal? findMealById(int? id) => + (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?); @override _i9.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), + Invocation.method(#fetchAndSetAllPlansSparse, []), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), + Invocation.method(#fetchAndSetAllPlansFull, []), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i9.Future<_i4.NutritionalPlan>.value( + _FakeNutritionalPlan_2( + this, + Invocation.method(#fetchAndSetPlanSparse, [planId]), ), - )), + ), ) as _i9.Future<_i4.NutritionalPlan>); @override _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( - this, - Invocation.method( - #fetchAndSetPlanFull, - [planId], + Invocation.method(#fetchAndSetPlanFull, [planId]), + returnValue: _i9.Future<_i4.NutritionalPlan>.value( + _FakeNutritionalPlan_2( + this, + Invocation.method(#fetchAndSetPlanFull, [planId]), ), - )), + ), ) as _i9.Future<_i4.NutritionalPlan>); @override _i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => (super.noSuchMethod( - Invocation.method( - #addPlan, - [planData], - ), - returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( - this, - Invocation.method( - #addPlan, - [planData], + Invocation.method(#addPlan, [planData]), + returnValue: _i9.Future<_i4.NutritionalPlan>.value( + _FakeNutritionalPlan_2( + this, + Invocation.method(#addPlan, [planData]), ), - )), + ), ) as _i9.Future<_i4.NutritionalPlan>); @override _i9.Future editPlan(_i4.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #editPlan, - [plan], - ), + Invocation.method(#editPlan, [plan]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future deletePlan(int? id) => (super.noSuchMethod( - Invocation.method( - #deletePlan, - [id], - ), + Invocation.method(#deletePlan, [id]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override - _i9.Future<_i5.Meal> addMeal( - _i5.Meal? meal, - int? planId, - ) => - (super.noSuchMethod( - Invocation.method( - #addMeal, - [ - meal, - planId, - ], + _i9.Future<_i5.Meal> addMeal(_i5.Meal? meal, int? planId) => (super.noSuchMethod( + Invocation.method(#addMeal, [meal, planId]), + returnValue: _i9.Future<_i5.Meal>.value( + _FakeMeal_3(this, Invocation.method(#addMeal, [meal, planId])), ), - returnValue: _i9.Future<_i5.Meal>.value(_FakeMeal_3( - this, - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - )), ) as _i9.Future<_i5.Meal>); @override _i9.Future<_i5.Meal> editMeal(_i5.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #editMeal, - [meal], + Invocation.method(#editMeal, [meal]), + returnValue: _i9.Future<_i5.Meal>.value( + _FakeMeal_3(this, Invocation.method(#editMeal, [meal])), ), - returnValue: _i9.Future<_i5.Meal>.value(_FakeMeal_3( - this, - Invocation.method( - #editMeal, - [meal], - ), - )), ) as _i9.Future<_i5.Meal>); @override _i9.Future deleteMeal(_i5.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #deleteMeal, - [meal], - ), + Invocation.method(#deleteMeal, [meal]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -322,41 +220,25 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP _i5.Meal? meal, ) => (super.noSuchMethod( - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - returnValue: _i9.Future<_i6.MealItem>.value(_FakeMealItem_4( - this, - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], + Invocation.method(#addMealItem, [mealItem, meal]), + returnValue: _i9.Future<_i6.MealItem>.value( + _FakeMealItem_4( + this, + Invocation.method(#addMealItem, [mealItem, meal]), ), - )), + ), ) as _i9.Future<_i6.MealItem>); @override _i9.Future deleteMealItem(_i6.MealItem? mealItem) => (super.noSuchMethod( - Invocation.method( - #deleteMealItem, - [mealItem], - ), + Invocation.method(#deleteMealItem, [mealItem]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method( - #clearIngredientCache, - [], - ), + Invocation.method(#clearIngredientCache, []), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -372,22 +254,21 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP [ingredientId], {#database: database}, ), - returnValue: _i9.Future<_i7.Ingredient>.value(_FakeIngredient_5( - this, - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, + returnValue: _i9.Future<_i7.Ingredient>.value( + _FakeIngredient_5( + this, + Invocation.method( + #fetchIngredient, + [ingredientId], + {#database: database}, + ), ), - )), + ), ) as _i9.Future<_i7.Ingredient>); @override _i9.Future fetchIngredientsFromCache() => (super.noSuchMethod( - Invocation.method( - #fetchIngredientsFromCache, - [], - ), + Invocation.method(#fetchIngredientsFromCache, []), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -395,37 +276,29 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP @override _i9.Future> searchIngredient( String? name, { - String? languageCode = r'en', + String? languageCode = 'en', bool? searchEnglish = false, }) => (super.noSuchMethod( Invocation.method( #searchIngredient, [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, + {#languageCode: languageCode, #searchEnglish: searchEnglish}, ), returnValue: _i9.Future>.value( - <_i10.IngredientApiSearchEntry>[]), + <_i10.IngredientApiSearchEntry>[], + ), ) as _i9.Future>); @override _i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod( - Invocation.method( - #searchIngredientWithCode, - [code], - ), + Invocation.method(#searchIngredientWithCode, [code]), returnValue: _i9.Future<_i7.Ingredient?>.value(), ) as _i9.Future<_i7.Ingredient?>); @override _i9.Future logMealToDiary(_i5.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #logMealToDiary, - [meal], - ), + Invocation.method(#logMealToDiary, [meal]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -437,78 +310,50 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method( - #logIngredientToDiary, - [ - mealItem, - planId, - dateTime, - ], - ), + Invocation.method(#logIngredientToDiary, [ + mealItem, + planId, + dateTime, + ]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override - _i9.Future deleteLog( - int? logId, - int? planId, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - planId, - ], - ), + _i9.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, planId]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLogs, - [plan], - ), + Invocation.method(#fetchAndSetLogs, [plan]), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } diff --git a/test/nutrition/nutritional_plan_screen_test.mocks.dart b/test/nutrition/nutritional_plan_screen_test.mocks.dart index 1a3aad46..d616d092 100644 --- a/test/nutrition/nutritional_plan_screen_test.mocks.dart +++ b/test/nutrition/nutritional_plan_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/nutrition/nutritional_plan_screen_test.dart. // Do not manually edit this file. @@ -23,59 +23,31 @@ import 'package:wger/providers/base_provider.dart' as _i4; // 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: must_be_immutable // 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 _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { - _FakeAuthProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { - _FakeClient_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_2 extends _i1.SmartFake implements Uri { - _FakeUri_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response { - _FakeResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i3.StreamedResponse { - _FakeStreamedResponse_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeStreamedResponse_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [WgerBaseProvider]. @@ -89,46 +61,32 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { @override _i2.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), ) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter( - #auth, - _auth, - ), + Invocation.setter(#auth, _auth), returnValueForMissingStub: null, ); @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), ) as _i3.Client); @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), returnValue: {}, ) as Map); @@ -143,58 +101,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), ), ) as Uri); @override _i5.Future> fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), + Invocation.method(#fetchPaginated, [uri]), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i5.Future> post(Map? data, Uri? uri) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -203,39 +142,21 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#deleteRequest, [url, id]), ), - )), + ), ) as _i5.Future<_i3.Response>); } @@ -249,37 +170,25 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider { @override set token(String? _token) => super.noSuchMethod( - Invocation.setter( - #token, - _token, - ), + Invocation.setter(#token, _token), returnValueForMissingStub: null, ); @override set serverUrl(String? _serverUrl) => super.noSuchMethod( - Invocation.setter( - #serverUrl, - _serverUrl, - ), + Invocation.setter(#serverUrl, _serverUrl), returnValueForMissingStub: null, ); @override set serverVersion(String? _serverVersion) => super.noSuchMethod( - Invocation.setter( - #serverVersion, - _serverVersion, - ), + Invocation.setter(#serverVersion, _serverVersion), returnValueForMissingStub: null, ); @override set applicationVersion(_i6.PackageInfo? _applicationVersion) => super.noSuchMethod( - Invocation.setter( - #applicationVersion, - _applicationVersion, - ), + Invocation.setter(#applicationVersion, _applicationVersion), returnValueForMissingStub: null, ); @@ -291,84 +200,56 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider { @override set metadata(Map? _metadata) => super.noSuchMethod( - Invocation.setter( - #metadata, - _metadata, - ), + Invocation.setter(#metadata, _metadata), returnValueForMissingStub: null, ); @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), ) as _i3.Client); @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override - bool get dataInit => (super.noSuchMethod( - Invocation.getter(#dataInit), - returnValue: false, - ) as bool); + bool get dataInit => + (super.noSuchMethod(Invocation.getter(#dataInit), returnValue: false) as bool); @override set dataInit(bool? _dataInit) => super.noSuchMethod( - Invocation.setter( - #dataInit, - _dataInit, - ), + Invocation.setter(#dataInit, _dataInit), returnValueForMissingStub: null, ); @override - bool get isAuth => (super.noSuchMethod( - Invocation.getter(#isAuth), - returnValue: false, - ) as bool); + bool get isAuth => (super.noSuchMethod(Invocation.getter(#isAuth), returnValue: false) as bool); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override _i5.Future setServerVersion() => (super.noSuchMethod( - Invocation.method( - #setServerVersion, - [], - ), + Invocation.method(#setServerVersion, []), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future setApplicationVersion() => (super.noSuchMethod( - Invocation.method( - #setApplicationVersion, - [], - ), + Invocation.method(#setApplicationVersion, []), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future initVersions(String? serverUrl) => (super.noSuchMethod( - Invocation.method( - #initVersions, - [serverUrl], - ), + Invocation.method(#initVersions, [serverUrl]), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @@ -379,13 +260,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider { Map? metadata, ]) => (super.noSuchMethod( - Invocation.method( - #applicationUpdateRequired, - [ - version, - metadata, - ], - ), + Invocation.method(#applicationUpdateRequired, [version, metadata]), returnValue: _i5.Future.value(false), ) as _i5.Future); @@ -395,21 +270,19 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider { required String? password, required String? email, required String? serverUrl, - String? locale = r'en', + String? locale = 'en', }) => (super.noSuchMethod( - Invocation.method( - #register, - [], - { - #username: username, - #password: password, - #email: email, - #serverUrl: serverUrl, - #locale: locale, - }, + Invocation.method(#register, [], { + #username: username, + #password: password, + #email: email, + #serverUrl: serverUrl, + #locale: locale, + }), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -419,100 +292,66 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider { String? serverUrl, ) => (super.noSuchMethod( - Invocation.method( - #login, - [ - username, - password, - serverUrl, - ], + Invocation.method(#login, [username, password, serverUrl]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future getServerUrlFromPrefs() => (super.noSuchMethod( - Invocation.method( - #getServerUrlFromPrefs, - [], - ), - returnValue: _i5.Future.value(_i7.dummyValue( - this, - Invocation.method( - #getServerUrlFromPrefs, - [], + Invocation.method(#getServerUrlFromPrefs, []), + returnValue: _i5.Future.value( + _i7.dummyValue( + this, + Invocation.method(#getServerUrlFromPrefs, []), ), - )), + ), ) as _i5.Future); @override _i5.Future tryAutoLogin() => (super.noSuchMethod( - Invocation.method( - #tryAutoLogin, - [], - ), + Invocation.method(#tryAutoLogin, []), returnValue: _i5.Future.value(false), ) as _i5.Future); @override _i5.Future logout({bool? shouldNotify = true}) => (super.noSuchMethod( - Invocation.method( - #logout, - [], - {#shouldNotify: shouldNotify}, - ), + Invocation.method(#logout, [], {#shouldNotify: shouldNotify}), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override String getAppNameHeader() => (super.noSuchMethod( - Invocation.method( - #getAppNameHeader, - [], - ), + Invocation.method(#getAppNameHeader, []), returnValue: _i7.dummyValue( this, - Invocation.method( - #getAppNameHeader, - [], - ), + Invocation.method(#getAppNameHeader, []), ), ) as String); @override void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } @@ -526,45 +365,25 @@ class MockClient extends _i1.Mock implements _i3.Client { } @override - _i5.Future<_i3.Response> head( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, + _i5.Future<_i3.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod( + Invocation.method(#head, [url], {#headers: headers}), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#head, [url], {#headers: headers}), ), - )), + ), ) as _i5.Future<_i3.Response>); @override - _i5.Future<_i3.Response> get( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, + _i5.Future<_i3.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod( + Invocation.method(#get, [url], {#headers: headers}), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#get, [url], {#headers: headers}), ), - )), + ), ) as _i5.Future<_i3.Response>); @override @@ -578,24 +397,18 @@ class MockClient extends _i1.Mock implements _i3.Client { Invocation.method( #post, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #post, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i5.Future<_i3.Response>); @override @@ -609,24 +422,18 @@ class MockClient extends _i1.Mock implements _i3.Client { Invocation.method( #put, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #put, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i5.Future<_i3.Response>); @override @@ -640,24 +447,18 @@ class MockClient extends _i1.Mock implements _i3.Client { Invocation.method( #patch, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #patch, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i5.Future<_i3.Response>); @override @@ -671,45 +472,29 @@ class MockClient extends _i1.Mock implements _i3.Client { Invocation.method( #delete, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i5.Future<_i3.Response>); @override - _i5.Future read( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future.value(_i7.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, + _i5.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod( + Invocation.method(#read, [url], {#headers: headers}), + returnValue: _i5.Future.value( + _i7.dummyValue( + this, + Invocation.method(#read, [url], {#headers: headers}), ), - )), + ), ) as _i5.Future); @override @@ -718,35 +503,24 @@ class MockClient extends _i1.Mock implements _i3.Client { Map? headers, }) => (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), + Invocation.method(#readBytes, [url], {#headers: headers}), returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)), ) as _i5.Future<_i10.Uint8List>); @override _i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) => (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: _i5.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_4( - this, - Invocation.method( - #send, - [request], + Invocation.method(#send, [request]), + returnValue: _i5.Future<_i3.StreamedResponse>.value( + _FakeStreamedResponse_4( + this, + Invocation.method(#send, [request]), ), - )), + ), ) as _i5.Future<_i3.StreamedResponse>); @override void close() => super.noSuchMethod( - Invocation.method( - #close, - [], - ), + Invocation.method(#close, []), returnValueForMissingStub: null, ); } diff --git a/test/nutrition/nutritional_plans_screen_test.mocks.dart b/test/nutrition/nutritional_plans_screen_test.mocks.dart index 74d77efe..27a1aa93 100644 --- a/test/nutrition/nutritional_plans_screen_test.mocks.dart +++ b/test/nutrition/nutritional_plans_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/nutrition/nutritional_plans_screen_test.dart. // Do not manually edit this file. @@ -23,59 +23,31 @@ import 'package:wger/providers/base_provider.dart' as _i8; // 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: must_be_immutable // 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 _FakeClient_0 extends _i1.SmartFake implements _i2.Client { - _FakeClient_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeAuthProvider_1 extends _i1.SmartFake implements _i3.AuthProvider { - _FakeAuthProvider_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_2 extends _i1.SmartFake implements Uri { - _FakeUri_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_3 extends _i1.SmartFake implements _i2.Response { - _FakeResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i2.StreamedResponse { - _FakeStreamedResponse_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeStreamedResponse_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [AuthProvider]. @@ -88,37 +60,25 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider { @override set token(String? _token) => super.noSuchMethod( - Invocation.setter( - #token, - _token, - ), + Invocation.setter(#token, _token), returnValueForMissingStub: null, ); @override set serverUrl(String? _serverUrl) => super.noSuchMethod( - Invocation.setter( - #serverUrl, - _serverUrl, - ), + Invocation.setter(#serverUrl, _serverUrl), returnValueForMissingStub: null, ); @override set serverVersion(String? _serverVersion) => super.noSuchMethod( - Invocation.setter( - #serverVersion, - _serverVersion, - ), + Invocation.setter(#serverVersion, _serverVersion), returnValueForMissingStub: null, ); @override set applicationVersion(_i4.PackageInfo? _applicationVersion) => super.noSuchMethod( - Invocation.setter( - #applicationVersion, - _applicationVersion, - ), + Invocation.setter(#applicationVersion, _applicationVersion), returnValueForMissingStub: null, ); @@ -130,84 +90,56 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider { @override set metadata(Map? _metadata) => super.noSuchMethod( - Invocation.setter( - #metadata, - _metadata, - ), + Invocation.setter(#metadata, _metadata), returnValueForMissingStub: null, ); @override _i2.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_0( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_0(this, Invocation.getter(#client)), ) as _i2.Client); @override set client(_i2.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override - bool get dataInit => (super.noSuchMethod( - Invocation.getter(#dataInit), - returnValue: false, - ) as bool); + bool get dataInit => + (super.noSuchMethod(Invocation.getter(#dataInit), returnValue: false) as bool); @override set dataInit(bool? _dataInit) => super.noSuchMethod( - Invocation.setter( - #dataInit, - _dataInit, - ), + Invocation.setter(#dataInit, _dataInit), returnValueForMissingStub: null, ); @override - bool get isAuth => (super.noSuchMethod( - Invocation.getter(#isAuth), - returnValue: false, - ) as bool); + bool get isAuth => (super.noSuchMethod(Invocation.getter(#isAuth), returnValue: false) as bool); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override _i5.Future setServerVersion() => (super.noSuchMethod( - Invocation.method( - #setServerVersion, - [], - ), + Invocation.method(#setServerVersion, []), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future setApplicationVersion() => (super.noSuchMethod( - Invocation.method( - #setApplicationVersion, - [], - ), + Invocation.method(#setApplicationVersion, []), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future initVersions(String? serverUrl) => (super.noSuchMethod( - Invocation.method( - #initVersions, - [serverUrl], - ), + Invocation.method(#initVersions, [serverUrl]), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @@ -218,13 +150,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider { Map? metadata, ]) => (super.noSuchMethod( - Invocation.method( - #applicationUpdateRequired, - [ - version, - metadata, - ], - ), + Invocation.method(#applicationUpdateRequired, [version, metadata]), returnValue: _i5.Future.value(false), ) as _i5.Future); @@ -234,21 +160,19 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider { required String? password, required String? email, required String? serverUrl, - String? locale = r'en', + String? locale = 'en', }) => (super.noSuchMethod( - Invocation.method( - #register, - [], - { - #username: username, - #password: password, - #email: email, - #serverUrl: serverUrl, - #locale: locale, - }, + Invocation.method(#register, [], { + #username: username, + #password: password, + #email: email, + #serverUrl: serverUrl, + #locale: locale, + }), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -258,100 +182,66 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider { String? serverUrl, ) => (super.noSuchMethod( - Invocation.method( - #login, - [ - username, - password, - serverUrl, - ], + Invocation.method(#login, [username, password, serverUrl]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future getServerUrlFromPrefs() => (super.noSuchMethod( - Invocation.method( - #getServerUrlFromPrefs, - [], - ), - returnValue: _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #getServerUrlFromPrefs, - [], + Invocation.method(#getServerUrlFromPrefs, []), + returnValue: _i5.Future.value( + _i6.dummyValue( + this, + Invocation.method(#getServerUrlFromPrefs, []), ), - )), + ), ) as _i5.Future); @override _i5.Future tryAutoLogin() => (super.noSuchMethod( - Invocation.method( - #tryAutoLogin, - [], - ), + Invocation.method(#tryAutoLogin, []), returnValue: _i5.Future.value(false), ) as _i5.Future); @override _i5.Future logout({bool? shouldNotify = true}) => (super.noSuchMethod( - Invocation.method( - #logout, - [], - {#shouldNotify: shouldNotify}, - ), + Invocation.method(#logout, [], {#shouldNotify: shouldNotify}), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override String getAppNameHeader() => (super.noSuchMethod( - Invocation.method( - #getAppNameHeader, - [], - ), + Invocation.method(#getAppNameHeader, []), returnValue: _i6.dummyValue( this, - Invocation.method( - #getAppNameHeader, - [], - ), + Invocation.method(#getAppNameHeader, []), ), ) as String); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } @@ -367,46 +257,32 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider { @override _i3.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_1( - this, - Invocation.getter(#auth), - ), + returnValue: _FakeAuthProvider_1(this, Invocation.getter(#auth)), ) as _i3.AuthProvider); @override set auth(_i3.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter( - #auth, - _auth, - ), + Invocation.setter(#auth, _auth), returnValueForMissingStub: null, ); @override _i2.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_0( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_0(this, Invocation.getter(#client)), ) as _i2.Client); @override set client(_i2.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), returnValue: {}, ) as Map); @@ -421,58 +297,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider { Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), ), ) as Uri); @override _i5.Future> fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), + Invocation.method(#fetchPaginated, [uri]), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i5.Future> post(Map? data, Uri? uri) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -481,39 +338,21 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override - _i5.Future<_i2.Response> deleteRequest( - String? url, - int? id, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], + _i5.Future<_i2.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#deleteRequest, [url, id]), ), - )), + ), ) as _i5.Future<_i2.Response>); } @@ -526,45 +365,25 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _i5.Future<_i2.Response> head( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, + _i5.Future<_i2.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod( + Invocation.method(#head, [url], {#headers: headers}), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#head, [url], {#headers: headers}), ), - )), + ), ) as _i5.Future<_i2.Response>); @override - _i5.Future<_i2.Response> get( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, + _i5.Future<_i2.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod( + Invocation.method(#get, [url], {#headers: headers}), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#get, [url], {#headers: headers}), ), - )), + ), ) as _i5.Future<_i2.Response>); @override @@ -578,24 +397,18 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #post, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #post, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i5.Future<_i2.Response>); @override @@ -609,24 +422,18 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #put, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #put, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i5.Future<_i2.Response>); @override @@ -640,24 +447,18 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #patch, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #patch, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i5.Future<_i2.Response>); @override @@ -671,45 +472,29 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #delete, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i5.Future<_i2.Response>); @override - _i5.Future read( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, + _i5.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod( + Invocation.method(#read, [url], {#headers: headers}), + returnValue: _i5.Future.value( + _i6.dummyValue( + this, + Invocation.method(#read, [url], {#headers: headers}), ), - )), + ), ) as _i5.Future); @override @@ -718,35 +503,24 @@ class MockClient extends _i1.Mock implements _i2.Client { Map? headers, }) => (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), + Invocation.method(#readBytes, [url], {#headers: headers}), returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)), ) as _i5.Future<_i10.Uint8List>); @override _i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: _i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4( - this, - Invocation.method( - #send, - [request], + Invocation.method(#send, [request]), + returnValue: _i5.Future<_i2.StreamedResponse>.value( + _FakeStreamedResponse_4( + this, + Invocation.method(#send, [request]), ), - )), + ), ) as _i5.Future<_i2.StreamedResponse>); @override void close() => super.noSuchMethod( - Invocation.method( - #close, - [], - ), + Invocation.method(#close, []), returnValueForMissingStub: null, ); } diff --git a/test/other/base_provider_test.mocks.dart b/test/other/base_provider_test.mocks.dart index ea7ee384..8d6e705f 100644 --- a/test/other/base_provider_test.mocks.dart +++ b/test/other/base_provider_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/other/base_provider_test.dart. // Do not manually edit this file. @@ -19,29 +19,19 @@ import 'package:mockito/src/dummies.dart' as _i5; // 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: must_be_immutable // 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 _FakeResponse_0 extends _i1.SmartFake implements _i2.Response { - _FakeResponse_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse { - _FakeStreamedResponse_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeStreamedResponse_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Client]. @@ -53,45 +43,25 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _i3.Future<_i2.Response> head( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, + _i3.Future<_i2.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod( + Invocation.method(#head, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method(#head, [url], {#headers: headers}), ), - )), + ), ) as _i3.Future<_i2.Response>); @override - _i3.Future<_i2.Response> get( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, + _i3.Future<_i2.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod( + Invocation.method(#get, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method(#get, [url], {#headers: headers}), ), - )), + ), ) as _i3.Future<_i2.Response>); @override @@ -105,24 +75,18 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #post, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #post, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i3.Future<_i2.Response>); @override @@ -136,24 +100,18 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #put, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #put, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i3.Future<_i2.Response>); @override @@ -167,24 +125,18 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #patch, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #patch, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i3.Future<_i2.Response>); @override @@ -198,45 +150,29 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #delete, [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + {#headers: headers, #body: body, #encoding: encoding}, ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), ), - )), + ), ) as _i3.Future<_i2.Response>); @override - _i3.Future read( - Uri? url, { - Map? headers, - }) => - (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future.value(_i5.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, + _i3.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod( + Invocation.method(#read, [url], {#headers: headers}), + returnValue: _i3.Future.value( + _i5.dummyValue( + this, + Invocation.method(#read, [url], {#headers: headers}), ), - )), + ), ) as _i3.Future); @override @@ -245,35 +181,24 @@ class MockClient extends _i1.Mock implements _i2.Client { Map? headers, }) => (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), + Invocation.method(#readBytes, [url], {#headers: headers}), returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), ) as _i3.Future<_i6.Uint8List>); @override _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1( - this, - Invocation.method( - #send, - [request], + Invocation.method(#send, [request]), + returnValue: _i3.Future<_i2.StreamedResponse>.value( + _FakeStreamedResponse_1( + this, + Invocation.method(#send, [request]), ), - )), + ), ) as _i3.Future<_i2.StreamedResponse>); @override void close() => super.noSuchMethod( - Invocation.method( - #close, - [], - ), + Invocation.method(#close, []), returnValueForMissingStub: null, ); } diff --git a/test/user/provider_test.mocks.dart b/test/user/provider_test.mocks.dart index 4b2572d9..da5aae95 100644 --- a/test/user/provider_test.mocks.dart +++ b/test/user/provider_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/user/provider_test.dart. // Do not manually edit this file. @@ -18,49 +18,26 @@ import 'package:wger/providers/base_provider.dart' as _i4; // 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: must_be_immutable // 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 _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { - _FakeAuthProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { - _FakeClient_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_2 extends _i1.SmartFake implements Uri { - _FakeUri_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response { - _FakeResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [WgerBaseProvider]. @@ -74,46 +51,32 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { @override _i2.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), ) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter( - #auth, - _auth, - ), + Invocation.setter(#auth, _auth), returnValueForMissingStub: null, ); @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), ) as _i3.Client); @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), returnValue: {}, ) as Map); @@ -128,58 +91,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), ), ) as Uri); @override _i5.Future> fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), + Invocation.method(#fetchPaginated, [uri]), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i5.Future> post(Map? data, Uri? uri) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -188,38 +132,20 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#deleteRequest, [url, id]), ), - )), + ), ) as _i5.Future<_i3.Response>); } diff --git a/test/weight/weight_provider_test.mocks.dart b/test/weight/weight_provider_test.mocks.dart index ac0e017b..e0d8746b 100644 --- a/test/weight/weight_provider_test.mocks.dart +++ b/test/weight/weight_provider_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/weight/weight_provider_test.dart. // Do not manually edit this file. @@ -18,49 +18,26 @@ import 'package:wger/providers/base_provider.dart' as _i4; // 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: must_be_immutable // 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 _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { - _FakeAuthProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { - _FakeClient_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_2 extends _i1.SmartFake implements Uri { - _FakeUri_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response { - _FakeResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [WgerBaseProvider]. @@ -74,46 +51,32 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { @override _i2.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), ) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter( - #auth, - _auth, - ), + Invocation.setter(#auth, _auth), returnValueForMissingStub: null, ); @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), ) as _i3.Client); @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), returnValue: {}, ) as Map); @@ -128,58 +91,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), ), ) as Uri); @override _i5.Future> fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), + Invocation.method(#fetchPaginated, [uri]), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i5.Future> post(Map? data, Uri? uri) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -188,38 +132,20 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#deleteRequest, [url, id]), ), - )), + ), ) as _i5.Future<_i3.Response>); } diff --git a/test/weight/weight_screen_test.mocks.dart b/test/weight/weight_screen_test.mocks.dart index 0fcf69c3..4edb80d2 100644 --- a/test/weight/weight_screen_test.mocks.dart +++ b/test/weight/weight_screen_test.mocks.dart @@ -1,25 +1,26 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/weight/weight_screen_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i10; -import 'dart:ui' as _i11; +import 'dart:async' as _i11; +import 'dart:ui' as _i12; -import 'package:flutter/material.dart' as _i13; +import 'package:flutter/material.dart' as _i14; import 'package:mockito/mockito.dart' as _i1; -import 'package:wger/database/ingredients/ingredients_database.dart' as _i4; +import 'package:shared_preferences/shared_preferences.dart' as _i4; +import 'package:wger/database/ingredients/ingredients_database.dart' as _i5; import 'package:wger/models/body_weight/weight_entry.dart' as _i3; -import 'package:wger/models/exercises/ingredient_api.dart' as _i16; -import 'package:wger/models/nutrition/ingredient.dart' as _i8; -import 'package:wger/models/nutrition/meal.dart' as _i6; -import 'package:wger/models/nutrition/meal_item.dart' as _i7; -import 'package:wger/models/nutrition/nutritional_plan.dart' as _i5; -import 'package:wger/models/user/profile.dart' as _i14; +import 'package:wger/models/exercises/ingredient_api.dart' as _i17; +import 'package:wger/models/nutrition/ingredient.dart' as _i9; +import 'package:wger/models/nutrition/meal.dart' as _i7; +import 'package:wger/models/nutrition/meal_item.dart' as _i8; +import 'package:wger/models/nutrition/nutritional_plan.dart' as _i6; +import 'package:wger/models/user/profile.dart' as _i15; import 'package:wger/providers/base_provider.dart' as _i2; -import 'package:wger/providers/body_weight.dart' as _i9; -import 'package:wger/providers/nutrition.dart' as _i15; -import 'package:wger/providers/user.dart' as _i12; +import 'package:wger/providers/body_weight.dart' as _i10; +import 'package:wger/providers/nutrition.dart' as _i16; +import 'package:wger/providers/user.dart' as _i13; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -29,85 +30,52 @@ import 'package:wger/providers/user.dart' as _i12; // 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: must_be_immutable // 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, - ); + _FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWeightEntry_1 extends _i1.SmartFake implements _i3.WeightEntry { - _FakeWeightEntry_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightEntry_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } -class _FakeIngredientDatabase_2 extends _i1.SmartFake implements _i4.IngredientDatabase { - _FakeIngredientDatabase_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeSharedPreferencesAsync_2 extends _i1.SmartFake implements _i4.SharedPreferencesAsync { + _FakeSharedPreferencesAsync_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } -class _FakeNutritionalPlan_3 extends _i1.SmartFake implements _i5.NutritionalPlan { - _FakeNutritionalPlan_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeIngredientDatabase_3 extends _i1.SmartFake implements _i5.IngredientDatabase { + _FakeIngredientDatabase_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } -class _FakeMeal_4 extends _i1.SmartFake implements _i6.Meal { - _FakeMeal_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeNutritionalPlan_4 extends _i1.SmartFake implements _i6.NutritionalPlan { + _FakeNutritionalPlan_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } -class _FakeMealItem_5 extends _i1.SmartFake implements _i7.MealItem { - _FakeMealItem_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeMeal_5 extends _i1.SmartFake implements _i7.Meal { + _FakeMeal_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } -class _FakeIngredient_6 extends _i1.SmartFake implements _i8.Ingredient { - _FakeIngredient_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeMealItem_6 extends _i1.SmartFake implements _i8.MealItem { + _FakeMealItem_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); +} + +class _FakeIngredient_7 extends _i1.SmartFake implements _i9.Ingredient { + _FakeIngredient_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// 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 _i10.BodyWeightProvider { MockBodyWeightProvider() { _i1.throwOnMissingStub(this); } @@ -129,126 +97,84 @@ class MockBodyWeightProvider extends _i1.Mock implements _i9.BodyWeightProvider @override set items(List<_i3.WeightEntry>? entries) => super.noSuchMethod( - Invocation.setter( - #items, - entries, - ), + Invocation.setter(#items, entries), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override _i3.WeightEntry findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), returnValue: _FakeWeightEntry_1( this, - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), ), ) as _i3.WeightEntry); @override - _i3.WeightEntry? findByDate(DateTime? date) => (super.noSuchMethod(Invocation.method( - #findByDate, - [date], - )) as _i3.WeightEntry?); + _i3.WeightEntry? findByDate(DateTime? date) => + (super.noSuchMethod(Invocation.method(#findByDate, [date])) as _i3.WeightEntry?); @override - _i10.Future> fetchAndSetEntries() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEntries, - [], + _i11.Future> fetchAndSetEntries() => (super.noSuchMethod( + Invocation.method(#fetchAndSetEntries, []), + returnValue: _i11.Future>.value( + <_i3.WeightEntry>[], ), - returnValue: _i10.Future>.value(<_i3.WeightEntry>[]), - ) as _i10.Future>); + ) as _i11.Future>); @override - _i10.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod( - Invocation.method( - #addEntry, - [entry], + _i11.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod( + Invocation.method(#addEntry, [entry]), + returnValue: _i11.Future<_i3.WeightEntry>.value( + _FakeWeightEntry_1(this, Invocation.method(#addEntry, [entry])), ), - returnValue: _i10.Future<_i3.WeightEntry>.value(_FakeWeightEntry_1( - this, - Invocation.method( - #addEntry, - [entry], - ), - )), - ) as _i10.Future<_i3.WeightEntry>); + ) as _i11.Future<_i3.WeightEntry>); @override - _i10.Future editEntry(_i3.WeightEntry? entry) => (super.noSuchMethod( - Invocation.method( - #editEntry, - [entry], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i11.Future editEntry(_i3.WeightEntry? entry) => (super.noSuchMethod( + Invocation.method(#editEntry, [entry]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future deleteEntry(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteEntry, - [id], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i11.Future deleteEntry(int? id) => (super.noSuchMethod( + Invocation.method(#deleteEntry, [id]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } @@ -256,23 +182,20 @@ class MockBodyWeightProvider extends _i1.Mock implements _i9.BodyWeightProvider /// A class which mocks [UserProvider]. /// /// See the documentation for Mockito's code generation for more information. -class MockUserProvider extends _i1.Mock implements _i12.UserProvider { +class MockUserProvider extends _i1.Mock implements _i13.UserProvider { MockUserProvider() { _i1.throwOnMissingStub(this); } @override - _i13.ThemeMode get themeMode => (super.noSuchMethod( + _i14.ThemeMode get themeMode => (super.noSuchMethod( Invocation.getter(#themeMode), - returnValue: _i13.ThemeMode.system, - ) as _i13.ThemeMode); + returnValue: _i14.ThemeMode.system, + ) as _i14.ThemeMode); @override - set themeMode(_i13.ThemeMode? _themeMode) => super.noSuchMethod( - Invocation.setter( - #themeMode, - _themeMode, - ), + set themeMode(_i14.ThemeMode? _themeMode) => super.noSuchMethod( + Invocation.setter(#themeMode, _themeMode), returnValueForMissingStub: null, ); @@ -286,101 +209,84 @@ class MockUserProvider extends _i1.Mock implements _i12.UserProvider { ) as _i2.WgerBaseProvider); @override - set profile(_i14.Profile? _profile) => super.noSuchMethod( - Invocation.setter( - #profile, - _profile, + _i4.SharedPreferencesAsync get prefs => (super.noSuchMethod( + Invocation.getter(#prefs), + returnValue: _FakeSharedPreferencesAsync_2( + this, + Invocation.getter(#prefs), ), + ) as _i4.SharedPreferencesAsync); + + @override + set prefs(_i4.SharedPreferencesAsync? _prefs) => super.noSuchMethod( + Invocation.setter(#prefs, _prefs), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + set profile(_i15.Profile? _profile) => super.noSuchMethod( + Invocation.setter(#profile, _profile), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override - void setThemeMode(_i13.ThemeMode? mode) => super.noSuchMethod( - Invocation.method( - #setThemeMode, - [mode], - ), + void setThemeMode(_i14.ThemeMode? mode) => super.noSuchMethod( + Invocation.method(#setThemeMode, [mode]), returnValueForMissingStub: null, ); @override - _i10.Future fetchAndSetProfile() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetProfile, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i11.Future fetchAndSetProfile() => (super.noSuchMethod( + Invocation.method(#fetchAndSetProfile, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future saveProfile() => (super.noSuchMethod( - Invocation.method( - #saveProfile, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i11.Future saveProfile() => (super.noSuchMethod( + Invocation.method(#saveProfile, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future verifyEmail() => (super.noSuchMethod( - Invocation.method( - #verifyEmail, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i11.Future verifyEmail() => (super.noSuchMethod( + Invocation.method(#verifyEmail, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } @@ -388,7 +294,7 @@ 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 _i15.NutritionPlansProvider { +class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlansProvider { MockNutritionPlansProvider() { _i1.throwOnMissingStub(this); } @@ -403,264 +309,178 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i15.NutritionPlans ) as _i2.WgerBaseProvider); @override - _i4.IngredientDatabase get database => (super.noSuchMethod( + _i5.IngredientDatabase get database => (super.noSuchMethod( Invocation.getter(#database), - returnValue: _FakeIngredientDatabase_2( + returnValue: _FakeIngredientDatabase_3( this, Invocation.getter(#database), ), - ) as _i4.IngredientDatabase); + ) as _i5.IngredientDatabase); @override - set database(_i4.IngredientDatabase? _database) => super.noSuchMethod( - Invocation.setter( - #database, - _database, - ), + set database(_i5.IngredientDatabase? _database) => super.noSuchMethod( + Invocation.setter(#database, _database), returnValueForMissingStub: null, ); @override - List<_i8.Ingredient> get ingredients => (super.noSuchMethod( + List<_i9.Ingredient> get ingredients => (super.noSuchMethod( Invocation.getter(#ingredients), - returnValue: <_i8.Ingredient>[], - ) as List<_i8.Ingredient>); + returnValue: <_i9.Ingredient>[], + ) as List<_i9.Ingredient>); @override - set ingredients(List<_i8.Ingredient>? _ingredients) => super.noSuchMethod( - Invocation.setter( - #ingredients, - _ingredients, - ), + set ingredients(List<_i9.Ingredient>? _ingredients) => super.noSuchMethod( + Invocation.setter(#ingredients, _ingredients), returnValueForMissingStub: null, ); @override - List<_i5.NutritionalPlan> get items => (super.noSuchMethod( + List<_i6.NutritionalPlan> get items => (super.noSuchMethod( Invocation.getter(#items), - returnValue: <_i5.NutritionalPlan>[], - ) as List<_i5.NutritionalPlan>); + returnValue: <_i6.NutritionalPlan>[], + ) as List<_i6.NutritionalPlan>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override - _i5.NutritionalPlan findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeNutritionalPlan_3( + _i6.NutritionalPlan findById(int? id) => (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeNutritionalPlan_4( this, - Invocation.method( - #findById, - [id], + Invocation.method(#findById, [id]), + ), + ) as _i6.NutritionalPlan); + + @override + _i7.Meal? findMealById(int? id) => + (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i7.Meal?); + + @override + _i11.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansSparse, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); + + @override + _i11.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansFull, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); + + @override + _i11.Future<_i6.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i11.Future<_i6.NutritionalPlan>.value( + _FakeNutritionalPlan_4( + this, + Invocation.method(#fetchAndSetPlanSparse, [planId]), ), ), - ) as _i5.NutritionalPlan); + ) as _i11.Future<_i6.NutritionalPlan>); @override - _i6.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( - #findMealById, - [id], - )) as _i6.Meal?); - - @override - _i10.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - - @override - _i10.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - - @override - _i10.Future<_i5.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i10.Future<_i5.NutritionalPlan>.value(_FakeNutritionalPlan_3( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], + _i11.Future<_i6.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanFull, [planId]), + returnValue: _i11.Future<_i6.NutritionalPlan>.value( + _FakeNutritionalPlan_4( + this, + Invocation.method(#fetchAndSetPlanFull, [planId]), ), - )), - ) as _i10.Future<_i5.NutritionalPlan>); + ), + ) as _i11.Future<_i6.NutritionalPlan>); @override - _i10.Future<_i5.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - returnValue: _i10.Future<_i5.NutritionalPlan>.value(_FakeNutritionalPlan_3( - this, - Invocation.method( - #fetchAndSetPlanFull, - [planId], + _i11.Future<_i6.NutritionalPlan> addPlan(_i6.NutritionalPlan? planData) => (super.noSuchMethod( + Invocation.method(#addPlan, [planData]), + returnValue: _i11.Future<_i6.NutritionalPlan>.value( + _FakeNutritionalPlan_4( + this, + Invocation.method(#addPlan, [planData]), ), - )), - ) as _i10.Future<_i5.NutritionalPlan>); - - @override - _i10.Future<_i5.NutritionalPlan> addPlan(_i5.NutritionalPlan? planData) => (super.noSuchMethod( - Invocation.method( - #addPlan, - [planData], ), - returnValue: _i10.Future<_i5.NutritionalPlan>.value(_FakeNutritionalPlan_3( - this, - Invocation.method( - #addPlan, - [planData], - ), - )), - ) as _i10.Future<_i5.NutritionalPlan>); + ) as _i11.Future<_i6.NutritionalPlan>); @override - _i10.Future editPlan(_i5.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #editPlan, - [plan], + _i11.Future editPlan(_i6.NutritionalPlan? plan) => (super.noSuchMethod( + Invocation.method(#editPlan, [plan]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); + + @override + _i11.Future deletePlan(int? id) => (super.noSuchMethod( + Invocation.method(#deletePlan, [id]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); + + @override + _i11.Future<_i7.Meal> addMeal(_i7.Meal? meal, int? planId) => (super.noSuchMethod( + Invocation.method(#addMeal, [meal, planId]), + returnValue: _i11.Future<_i7.Meal>.value( + _FakeMeal_5(this, Invocation.method(#addMeal, [meal, planId])), ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + ) as _i11.Future<_i7.Meal>); @override - _i10.Future deletePlan(int? id) => (super.noSuchMethod( - Invocation.method( - #deletePlan, - [id], + _i11.Future<_i7.Meal> editMeal(_i7.Meal? meal) => (super.noSuchMethod( + Invocation.method(#editMeal, [meal]), + returnValue: _i11.Future<_i7.Meal>.value( + _FakeMeal_5(this, Invocation.method(#editMeal, [meal])), ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + ) as _i11.Future<_i7.Meal>); @override - _i10.Future<_i6.Meal> addMeal( - _i6.Meal? meal, - int? planId, + _i11.Future deleteMeal(_i7.Meal? meal) => (super.noSuchMethod( + Invocation.method(#deleteMeal, [meal]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); + + @override + _i11.Future<_i8.MealItem> addMealItem( + _i8.MealItem? mealItem, + _i7.Meal? meal, ) => (super.noSuchMethod( - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - returnValue: _i10.Future<_i6.Meal>.value(_FakeMeal_4( - this, - Invocation.method( - #addMeal, - [ - meal, - planId, - ], + Invocation.method(#addMealItem, [mealItem, meal]), + returnValue: _i11.Future<_i8.MealItem>.value( + _FakeMealItem_6( + this, + Invocation.method(#addMealItem, [mealItem, meal]), ), - )), - ) as _i10.Future<_i6.Meal>); - - @override - _i10.Future<_i6.Meal> editMeal(_i6.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #editMeal, - [meal], ), - returnValue: _i10.Future<_i6.Meal>.value(_FakeMeal_4( - this, - Invocation.method( - #editMeal, - [meal], - ), - )), - ) as _i10.Future<_i6.Meal>); + ) as _i11.Future<_i8.MealItem>); @override - _i10.Future deleteMeal(_i6.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #deleteMeal, - [meal], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i11.Future deleteMealItem(_i8.MealItem? mealItem) => (super.noSuchMethod( + Invocation.method(#deleteMealItem, [mealItem]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future<_i7.MealItem> addMealItem( - _i7.MealItem? mealItem, - _i6.Meal? meal, - ) => - (super.noSuchMethod( - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - returnValue: _i10.Future<_i7.MealItem>.value(_FakeMealItem_5( - this, - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - )), - ) as _i10.Future<_i7.MealItem>); + _i11.Future clearIngredientCache() => (super.noSuchMethod( + Invocation.method(#clearIngredientCache, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future deleteMealItem(_i7.MealItem? mealItem) => (super.noSuchMethod( - Invocation.method( - #deleteMealItem, - [mealItem], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - - @override - _i10.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method( - #clearIngredientCache, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - - @override - _i10.Future<_i8.Ingredient> fetchIngredient( + _i11.Future<_i9.Ingredient> fetchIngredient( int? ingredientId, { - _i4.IngredientDatabase? database, + _i5.IngredientDatabase? database, }) => (super.noSuchMethod( Invocation.method( @@ -668,143 +488,106 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i15.NutritionPlans [ingredientId], {#database: database}, ), - returnValue: _i10.Future<_i8.Ingredient>.value(_FakeIngredient_6( - this, - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, + returnValue: _i11.Future<_i9.Ingredient>.value( + _FakeIngredient_7( + this, + Invocation.method( + #fetchIngredient, + [ingredientId], + {#database: database}, + ), ), - )), - ) as _i10.Future<_i8.Ingredient>); - - @override - _i10.Future fetchIngredientsFromCache() => (super.noSuchMethod( - Invocation.method( - #fetchIngredientsFromCache, - [], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + ) as _i11.Future<_i9.Ingredient>); @override - _i10.Future> searchIngredient( + _i11.Future fetchIngredientsFromCache() => (super.noSuchMethod( + Invocation.method(#fetchIngredientsFromCache, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); + + @override + _i11.Future> searchIngredient( String? name, { - String? languageCode = r'en', + String? languageCode = 'en', bool? searchEnglish = false, }) => (super.noSuchMethod( Invocation.method( #searchIngredient, [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, + {#languageCode: languageCode, #searchEnglish: searchEnglish}, ), - returnValue: _i10.Future>.value( - <_i16.IngredientApiSearchEntry>[]), - ) as _i10.Future>); + returnValue: _i11.Future>.value( + <_i17.IngredientApiSearchEntry>[], + ), + ) as _i11.Future>); @override - _i10.Future<_i8.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod( - Invocation.method( - #searchIngredientWithCode, - [code], - ), - returnValue: _i10.Future<_i8.Ingredient?>.value(), - ) as _i10.Future<_i8.Ingredient?>); + _i11.Future<_i9.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod( + Invocation.method(#searchIngredientWithCode, [code]), + returnValue: _i11.Future<_i9.Ingredient?>.value(), + ) as _i11.Future<_i9.Ingredient?>); @override - _i10.Future logMealToDiary(_i6.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #logMealToDiary, - [meal], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i11.Future logMealToDiary(_i7.Meal? meal) => (super.noSuchMethod( + Invocation.method(#logMealToDiary, [meal]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future logIngredientToDiary( - _i7.MealItem? mealItem, + _i11.Future logIngredientToDiary( + _i8.MealItem? mealItem, int? planId, [ DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method( - #logIngredientToDiary, - [ - mealItem, - planId, - dateTime, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#logIngredientToDiary, [ + mealItem, + planId, + dateTime, + ]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future deleteLog( - int? logId, - int? planId, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - planId, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i11.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, planId]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future fetchAndSetLogs(_i5.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLogs, - [plan], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i11.Future fetchAndSetLogs(_i6.NutritionalPlan? plan) => (super.noSuchMethod( + Invocation.method(#fetchAndSetLogs, [plan]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } diff --git a/test/workout/gym_mode_screen_test.mocks.dart b/test/workout/gym_mode_screen_test.mocks.dart index b2ffb89d..54faf089 100644 --- a/test/workout/gym_mode_screen_test.mocks.dart +++ b/test/workout/gym_mode_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/workout/gym_mode_screen_test.dart. // Do not manually edit this file. @@ -26,119 +26,57 @@ import 'package:wger/providers/exercises.dart' as _i12; // 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: must_be_immutable // 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 _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { - _FakeAuthProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { - _FakeClient_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_2 extends _i1.SmartFake implements Uri { - _FakeUri_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response { - _FakeResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvider { - _FakeWgerBaseProvider_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWgerBaseProvider_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExerciseDatabase_5 extends _i1.SmartFake implements _i5.ExerciseDatabase { - _FakeExerciseDatabase_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseDatabase_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExercise_6 extends _i1.SmartFake implements _i6.Exercise { - _FakeExercise_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExercise_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeExerciseCategory_7 extends _i1.SmartFake implements _i7.ExerciseCategory { - _FakeExerciseCategory_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseCategory_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeEquipment_8 extends _i1.SmartFake implements _i8.Equipment { - _FakeEquipment_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeEquipment_8(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMuscle_9 extends _i1.SmartFake implements _i9.Muscle { - _FakeMuscle_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMuscle_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeLanguage_10 extends _i1.SmartFake implements _i10.Language { - _FakeLanguage_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLanguage_10(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [WgerBaseProvider]. @@ -152,46 +90,32 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { @override _i2.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), ) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter( - #auth, - _auth, - ), + Invocation.setter(#auth, _auth), returnValueForMissingStub: null, ); @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), ) as _i3.Client); @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), returnValue: {}, ) as Map); @@ -206,41 +130,29 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), ), ) as Uri); @override _i11.Future> fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], + Invocation.method(#fetch, [uri]), + returnValue: _i11.Future>.value( + {}, ), - returnValue: _i11.Future>.value({}), ) as _i11.Future>); @override _i11.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), + Invocation.method(#fetchPaginated, [uri]), returnValue: _i11.Future>.value([]), ) as _i11.Future>); @@ -250,14 +162,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], + Invocation.method(#post, [data, uri]), + returnValue: _i11.Future>.value( + {}, ), - returnValue: _i11.Future>.value({}), ) as _i11.Future>); @override @@ -266,39 +174,21 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], + Invocation.method(#patch, [data, uri]), + returnValue: _i11.Future>.value( + {}, ), - returnValue: _i11.Future>.value({}), ) as _i11.Future>); @override - _i11.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i11.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], + _i11.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i11.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#deleteRequest, [url, id]), ), - )), + ), ) as _i11.Future<_i3.Response>); } @@ -330,10 +220,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { @override set database(_i5.ExerciseDatabase? _database) => super.noSuchMethod( - Invocation.setter( - #database, - _database, - ), + Invocation.setter(#database, _database), returnValueForMissingStub: null, ); @@ -345,10 +232,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { @override set exercises(List<_i6.Exercise>? _exercises) => super.noSuchMethod( - Invocation.setter( - #exercises, - _exercises, - ), + Invocation.setter(#exercises, _exercises), returnValueForMissingStub: null, ); @@ -360,10 +244,7 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { @override set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod( - Invocation.setter( - #filteredExercises, - newFilteredExercises, - ), + Invocation.setter(#filteredExercises, newFilteredExercises), returnValueForMissingStub: null, ); @@ -399,69 +280,46 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { @override set languages(List<_i10.Language>? languages) => super.noSuchMethod( - Invocation.setter( - #languages, - languages, - ), + Invocation.setter(#languages, languages), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override _i11.Future setFilters(_i12.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #setFilters, - [newFilters], - ), + Invocation.method(#setFilters, [newFilters]), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override void initFilters() => super.noSuchMethod( - Invocation.method( - #initFilters, - [], - ), + Invocation.method(#initFilters, []), returnValueForMissingStub: null, ); @override _i11.Future findByFilters() => (super.noSuchMethod( - Invocation.method( - #findByFilters, - [], - ), + Invocation.method(#findByFilters, []), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override _i6.Exercise findExerciseById(int? id) => (super.noSuchMethod( - Invocation.method( - #findExerciseById, - [id], - ), + Invocation.method(#findExerciseById, [id]), returnValue: _FakeExercise_6( this, - Invocation.method( - #findExerciseById, - [id], - ), + Invocation.method(#findExerciseById, [id]), ), ) as _i6.Exercise); @@ -481,117 +339,77 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { @override _i7.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), + Invocation.method(#findCategoryById, [id]), returnValue: _FakeExerciseCategory_7( this, - Invocation.method( - #findCategoryById, - [id], - ), + Invocation.method(#findCategoryById, [id]), ), ) as _i7.ExerciseCategory); @override _i8.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method( - #findEquipmentById, - [id], - ), + Invocation.method(#findEquipmentById, [id]), returnValue: _FakeEquipment_8( this, - Invocation.method( - #findEquipmentById, - [id], - ), + Invocation.method(#findEquipmentById, [id]), ), ) as _i8.Equipment); @override _i9.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method( - #findMuscleById, - [id], - ), + Invocation.method(#findMuscleById, [id]), returnValue: _FakeMuscle_9( this, - Invocation.method( - #findMuscleById, - [id], - ), + Invocation.method(#findMuscleById, [id]), ), ) as _i9.Muscle); @override _i10.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method( - #findLanguageById, - [id], - ), + Invocation.method(#findLanguageById, [id]), returnValue: _FakeLanguage_10( this, - Invocation.method( - #findLanguageById, - [id], - ), + Invocation.method(#findLanguageById, [id]), ), ) as _i10.Language); @override _i11.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoriesFromApi, - [], - ), + Invocation.method(#fetchAndSetCategoriesFromApi, []), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMusclesFromApi, - [], - ), + Invocation.method(#fetchAndSetMusclesFromApi, []), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipmentsFromApi, - [], - ), + Invocation.method(#fetchAndSetEquipmentsFromApi, []), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguagesFromApi, - [], - ), + Invocation.method(#fetchAndSetLanguagesFromApi, []), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future<_i6.Exercise> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetExercise, - [exerciseId], - ), - returnValue: _i11.Future<_i6.Exercise>.value(_FakeExercise_6( - this, - Invocation.method( - #fetchAndSetExercise, - [exerciseId], + Invocation.method(#fetchAndSetExercise, [exerciseId]), + returnValue: _i11.Future<_i6.Exercise>.value( + _FakeExercise_6( + this, + Invocation.method(#fetchAndSetExercise, [exerciseId]), ), - )), + ), ) as _i11.Future<_i6.Exercise>); @override @@ -600,52 +418,40 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { int? exerciseId, ) => (super.noSuchMethod( - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - returnValue: _i11.Future<_i6.Exercise>.value(_FakeExercise_6( - this, - Invocation.method( - #handleUpdateExerciseFromApi, - [ + Invocation.method(#handleUpdateExerciseFromApi, [ + database, + exerciseId, + ]), + returnValue: _i11.Future<_i6.Exercise>.value( + _FakeExercise_6( + this, + Invocation.method(#handleUpdateExerciseFromApi, [ database, exerciseId, - ], + ]), ), - )), + ), ) as _i11.Future<_i6.Exercise>); @override _i11.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod( - Invocation.method( - #initCacheTimesLocalPrefs, - [], - {#forceInit: forceInit}, - ), + Invocation.method(#initCacheTimesLocalPrefs, [], { + #forceInit: forceInit, + }), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future clearAllCachesAndPrefs() => (super.noSuchMethod( - Invocation.method( - #clearAllCachesAndPrefs, - [], - ), + Invocation.method(#clearAllCachesAndPrefs, []), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetInitialData, - [], - ), + Invocation.method(#fetchAndSetInitialData, []), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @@ -667,50 +473,35 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { @override _i11.Future updateExerciseCache(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #updateExerciseCache, - [database], - ), + Invocation.method(#updateExerciseCache, [database]), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetMuscles(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMuscles, - [database], - ), + Invocation.method(#fetchAndSetMuscles, [database]), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetCategories(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [database], - ), + Invocation.method(#fetchAndSetCategories, [database]), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetLanguages(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguages, - [database], - ), + Invocation.method(#fetchAndSetLanguages, [database]), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetEquipments(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipments, - [database], - ), + Invocation.method(#fetchAndSetEquipments, [database]), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @@ -718,54 +509,41 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { @override _i11.Future> searchExercise( String? name, { - String? languageCode = r'en', + String? languageCode = 'en', bool? searchEnglish = false, }) => (super.noSuchMethod( Invocation.method( #searchExercise, [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i11.Future>.value( + <_i6.Exercise>[], ), - returnValue: _i11.Future>.value(<_i6.Exercise>[]), ) as _i11.Future>); @override void addListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } diff --git a/test/workout/repetition_unit_form_widget_test.mocks.dart b/test/workout/repetition_unit_form_widget_test.mocks.dart index 1c716093..ec0569c5 100644 --- a/test/workout/repetition_unit_form_widget_test.mocks.dart +++ b/test/workout/repetition_unit_form_widget_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/workout/repetition_unit_form_widget_test.dart. // Do not manually edit this file. @@ -29,99 +29,49 @@ import 'package:wger/providers/workout_plans.dart' as _i11; // 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: must_be_immutable // 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, - ); + _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, - ); + _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, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWorkoutPlan_3 extends _i1.SmartFake implements _i5.WorkoutPlan { - _FakeWorkoutPlan_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutPlan_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, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSet_5 extends _i1.SmartFake implements _i7.Set { - _FakeSet_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSet_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSetting_6 extends _i1.SmartFake implements _i8.Setting { - _FakeSetting_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSetting_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession { - _FakeWorkoutSession_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_8 extends _i1.SmartFake implements _i10.Log { - _FakeLog_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_8(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [WorkoutPlansProvider]. @@ -178,152 +128,105 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv ) as _i4.RepetitionUnit); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override List<_i5.WorkoutPlan> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), + Invocation.method(#getPlans, []), returnValue: <_i5.WorkoutPlan>[], ) as List<_i5.WorkoutPlan>); @override _i5.WorkoutPlan findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), returnValue: _FakeWorkoutPlan_3( this, - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), ), ) as _i5.WorkoutPlan); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), + Invocation.method(#findIndexById, [id]), returnValue: 0, ) as int); @override void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method( - #setCurrentPlan, - [id], - ), + Invocation.method(#setCurrentPlan, [id]), returnValueForMissingStub: null, ); @override void resetCurrentPlan() => super.noSuchMethod( - Invocation.method( - #resetCurrentPlan, - [], - ), + Invocation.method(#resetCurrentPlan, []), returnValueForMissingStub: null, ); @override _i12.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), + Invocation.method(#fetchAndSetAllPlansFull, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), + Invocation.method(#fetchAndSetAllPlansSparse, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i12.Future<_i5.WorkoutPlan>.value(_FakeWorkoutPlan_3( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i12.Future<_i5.WorkoutPlan>.value( + _FakeWorkoutPlan_3( + this, + Invocation.method(#fetchAndSetPlanSparse, [planId]), ), - )), + ), ) as _i12.Future<_i5.WorkoutPlan>); @override _i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWorkoutPlanFull, - [workoutId], - ), - returnValue: _i12.Future<_i5.WorkoutPlan>.value(_FakeWorkoutPlan_3( - this, - Invocation.method( - #fetchAndSetWorkoutPlanFull, - [workoutId], + Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]), + returnValue: _i12.Future<_i5.WorkoutPlan>.value( + _FakeWorkoutPlan_3( + this, + Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]), ), - )), + ), ) as _i12.Future<_i5.WorkoutPlan>); @override _i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod( - Invocation.method( - #addWorkout, - [workout], - ), - returnValue: _i12.Future<_i5.WorkoutPlan>.value(_FakeWorkoutPlan_3( - this, - Invocation.method( - #addWorkout, - [workout], + Invocation.method(#addWorkout, [workout]), + returnValue: _i12.Future<_i5.WorkoutPlan>.value( + _FakeWorkoutPlan_3( + this, + Invocation.method(#addWorkout, [workout]), ), - )), + ), ) as _i12.Future<_i5.WorkoutPlan>); @override _i12.Future editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod( - Invocation.method( - #editWorkout, - [workout], - ), + Invocation.method(#editWorkout, [workout]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future deleteWorkout(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteWorkout, - [id], - ), + Invocation.method(#deleteWorkout, [id]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @@ -334,112 +237,66 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv _i13.Exercise? base, ) => (super.noSuchMethod( - Invocation.method( - #fetchLogData, - [ - workout, - base, - ], + Invocation.method(#fetchLogData, [workout, base]), + returnValue: _i12.Future>.value( + {}, ), - returnValue: _i12.Future>.value({}), ) as _i12.Future>); @override _i12.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), + Invocation.method(#fetchAndSetRepetitionUnits, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), + Invocation.method(#fetchAndSetWeightUnits, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), + Invocation.method(#fetchAndSetUnits, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override - _i12.Future<_i6.Day> addDay( - _i6.Day? day, - _i5.WorkoutPlan? workout, - ) => - (super.noSuchMethod( - Invocation.method( - #addDay, - [ - day, - workout, - ], + _i12.Future<_i6.Day> addDay(_i6.Day? day, _i5.WorkoutPlan? workout) => (super.noSuchMethod( + Invocation.method(#addDay, [day, workout]), + returnValue: _i12.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day, workout])), ), - returnValue: _i12.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [ - day, - workout, - ], - ), - )), ) as _i12.Future<_i6.Day>); @override _i12.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), + Invocation.method(#editDay, [day]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future deleteDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [day], - ), + Invocation.method(#deleteDay, [day]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future<_i7.Set> addSet(_i7.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #addSet, - [workoutSet], + Invocation.method(#addSet, [workoutSet]), + returnValue: _i12.Future<_i7.Set>.value( + _FakeSet_5(this, Invocation.method(#addSet, [workoutSet])), ), - returnValue: _i12.Future<_i7.Set>.value(_FakeSet_5( - this, - Invocation.method( - #addSet, - [workoutSet], - ), - )), ) as _i12.Future<_i7.Set>); @override _i12.Future editSet(_i7.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #editSet, - [workoutSet], - ), + Invocation.method(#editSet, [workoutSet]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @@ -450,22 +307,13 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv int? startIndex, ) => (super.noSuchMethod( - Invocation.method( - #reorderSets, - [ - sets, - startIndex, - ], - ), + Invocation.method(#reorderSets, [sets, startIndex]), returnValue: _i12.Future>.value(<_i7.Set>[]), ) as _i12.Future>); @override _i12.Future fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #fetchComputedSettings, - [workoutSet], - ), + Invocation.method(#fetchComputedSettings, [workoutSet]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @@ -476,132 +324,86 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv _i14.Translation? exercise, ) => (super.noSuchMethod( - Invocation.method( - #fetchSmartText, - [ - workoutSet, - exercise, - ], - ), - returnValue: _i12.Future.value(_i15.dummyValue( - this, - Invocation.method( - #fetchSmartText, - [ - workoutSet, - exercise, - ], + Invocation.method(#fetchSmartText, [workoutSet, exercise]), + returnValue: _i12.Future.value( + _i15.dummyValue( + this, + Invocation.method(#fetchSmartText, [workoutSet, exercise]), ), - )), + ), ) as _i12.Future); @override _i12.Future deleteSet(_i7.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #deleteSet, - [workoutSet], - ), + Invocation.method(#deleteSet, [workoutSet]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) => (super.noSuchMethod( - Invocation.method( - #addSetting, - [workoutSetting], - ), - returnValue: _i12.Future<_i8.Setting>.value(_FakeSetting_6( - this, - Invocation.method( - #addSetting, - [workoutSetting], + Invocation.method(#addSetting, [workoutSetting]), + returnValue: _i12.Future<_i8.Setting>.value( + _FakeSetting_6( + this, + Invocation.method(#addSetting, [workoutSetting]), ), - )), + ), ) as _i12.Future<_i8.Setting>); @override _i12.Future fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), + Invocation.method(#fetchSessionData, []), returnValue: _i12.Future.value(), ) as _i12.Future); @override _i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #addSession, - [session], - ), - returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7( - this, - Invocation.method( - #addSession, - [session], + Invocation.method(#addSession, [session]), + returnValue: _i12.Future<_i9.WorkoutSession>.value( + _FakeWorkoutSession_7( + this, + Invocation.method(#addSession, [session]), ), - )), + ), ) as _i12.Future<_i9.WorkoutSession>); @override _i12.Future<_i10.Log> addLog(_i10.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], + Invocation.method(#addLog, [log]), + returnValue: _i12.Future<_i10.Log>.value( + _FakeLog_8(this, Invocation.method(#addLog, [log])), ), - returnValue: _i12.Future<_i10.Log>.value(_FakeLog_8( - this, - Invocation.method( - #addLog, - [log], - ), - )), ) as _i12.Future<_i10.Log>); @override _i12.Future deleteLog(_i10.Log? log) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [log], - ), + Invocation.method(#deleteLog, [log]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } diff --git a/test/workout/weight_unit_form_widget_test.mocks.dart b/test/workout/weight_unit_form_widget_test.mocks.dart index 994ac3ff..9b805458 100644 --- a/test/workout/weight_unit_form_widget_test.mocks.dart +++ b/test/workout/weight_unit_form_widget_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/workout/weight_unit_form_widget_test.dart. // Do not manually edit this file. @@ -19,29 +19,19 @@ import 'package:wger/providers/body_weight.dart' as _i4; // 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: must_be_immutable // 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, - ); + _FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWeightEntry_1 extends _i1.SmartFake implements _i3.WeightEntry { - _FakeWeightEntry_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightEntry_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [BodyWeightProvider]. @@ -69,126 +59,84 @@ class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider @override set items(List<_i3.WeightEntry>? entries) => super.noSuchMethod( - Invocation.setter( - #items, - entries, - ), + Invocation.setter(#items, entries), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override _i3.WeightEntry findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), returnValue: _FakeWeightEntry_1( this, - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), ), ) as _i3.WeightEntry); @override - _i3.WeightEntry? findByDate(DateTime? date) => (super.noSuchMethod(Invocation.method( - #findByDate, - [date], - )) as _i3.WeightEntry?); + _i3.WeightEntry? findByDate(DateTime? date) => + (super.noSuchMethod(Invocation.method(#findByDate, [date])) as _i3.WeightEntry?); @override _i5.Future> fetchAndSetEntries() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEntries, - [], + Invocation.method(#fetchAndSetEntries, []), + returnValue: _i5.Future>.value( + <_i3.WeightEntry>[], ), - returnValue: _i5.Future>.value(<_i3.WeightEntry>[]), ) as _i5.Future>); @override _i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod( - Invocation.method( - #addEntry, - [entry], + Invocation.method(#addEntry, [entry]), + returnValue: _i5.Future<_i3.WeightEntry>.value( + _FakeWeightEntry_1(this, Invocation.method(#addEntry, [entry])), ), - returnValue: _i5.Future<_i3.WeightEntry>.value(_FakeWeightEntry_1( - this, - Invocation.method( - #addEntry, - [entry], - ), - )), ) as _i5.Future<_i3.WeightEntry>); @override _i5.Future editEntry(_i3.WeightEntry? entry) => (super.noSuchMethod( - Invocation.method( - #editEntry, - [entry], - ), + Invocation.method(#editEntry, [entry]), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future deleteEntry(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteEntry, - [id], - ), + Invocation.method(#deleteEntry, [id]), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override void addListener(_i6.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i6.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } diff --git a/test/workout/workout_day_form_test.mocks.dart b/test/workout/workout_day_form_test.mocks.dart index 4c2d603d..384b24be 100644 --- a/test/workout/workout_day_form_test.mocks.dart +++ b/test/workout/workout_day_form_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/workout/workout_day_form_test.dart. // Do not manually edit this file. @@ -29,99 +29,49 @@ import 'package:wger/providers/workout_plans.dart' as _i11; // 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: must_be_immutable // 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, - ); + _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, - ); + _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, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWorkoutPlan_3 extends _i1.SmartFake implements _i5.WorkoutPlan { - _FakeWorkoutPlan_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutPlan_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, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSet_5 extends _i1.SmartFake implements _i7.Set { - _FakeSet_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSet_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSetting_6 extends _i1.SmartFake implements _i8.Setting { - _FakeSetting_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSetting_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession { - _FakeWorkoutSession_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_8 extends _i1.SmartFake implements _i10.Log { - _FakeLog_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_8(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [WorkoutPlansProvider]. @@ -178,152 +128,105 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv ) as _i4.RepetitionUnit); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override List<_i5.WorkoutPlan> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), + Invocation.method(#getPlans, []), returnValue: <_i5.WorkoutPlan>[], ) as List<_i5.WorkoutPlan>); @override _i5.WorkoutPlan findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), returnValue: _FakeWorkoutPlan_3( this, - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), ), ) as _i5.WorkoutPlan); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), + Invocation.method(#findIndexById, [id]), returnValue: 0, ) as int); @override void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method( - #setCurrentPlan, - [id], - ), + Invocation.method(#setCurrentPlan, [id]), returnValueForMissingStub: null, ); @override void resetCurrentPlan() => super.noSuchMethod( - Invocation.method( - #resetCurrentPlan, - [], - ), + Invocation.method(#resetCurrentPlan, []), returnValueForMissingStub: null, ); @override _i12.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), + Invocation.method(#fetchAndSetAllPlansFull, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), + Invocation.method(#fetchAndSetAllPlansSparse, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i12.Future<_i5.WorkoutPlan>.value(_FakeWorkoutPlan_3( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i12.Future<_i5.WorkoutPlan>.value( + _FakeWorkoutPlan_3( + this, + Invocation.method(#fetchAndSetPlanSparse, [planId]), ), - )), + ), ) as _i12.Future<_i5.WorkoutPlan>); @override _i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWorkoutPlanFull, - [workoutId], - ), - returnValue: _i12.Future<_i5.WorkoutPlan>.value(_FakeWorkoutPlan_3( - this, - Invocation.method( - #fetchAndSetWorkoutPlanFull, - [workoutId], + Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]), + returnValue: _i12.Future<_i5.WorkoutPlan>.value( + _FakeWorkoutPlan_3( + this, + Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]), ), - )), + ), ) as _i12.Future<_i5.WorkoutPlan>); @override _i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod( - Invocation.method( - #addWorkout, - [workout], - ), - returnValue: _i12.Future<_i5.WorkoutPlan>.value(_FakeWorkoutPlan_3( - this, - Invocation.method( - #addWorkout, - [workout], + Invocation.method(#addWorkout, [workout]), + returnValue: _i12.Future<_i5.WorkoutPlan>.value( + _FakeWorkoutPlan_3( + this, + Invocation.method(#addWorkout, [workout]), ), - )), + ), ) as _i12.Future<_i5.WorkoutPlan>); @override _i12.Future editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod( - Invocation.method( - #editWorkout, - [workout], - ), + Invocation.method(#editWorkout, [workout]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future deleteWorkout(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteWorkout, - [id], - ), + Invocation.method(#deleteWorkout, [id]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @@ -334,112 +237,66 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv _i13.Exercise? base, ) => (super.noSuchMethod( - Invocation.method( - #fetchLogData, - [ - workout, - base, - ], + Invocation.method(#fetchLogData, [workout, base]), + returnValue: _i12.Future>.value( + {}, ), - returnValue: _i12.Future>.value({}), ) as _i12.Future>); @override _i12.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), + Invocation.method(#fetchAndSetRepetitionUnits, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), + Invocation.method(#fetchAndSetWeightUnits, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), + Invocation.method(#fetchAndSetUnits, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override - _i12.Future<_i6.Day> addDay( - _i6.Day? day, - _i5.WorkoutPlan? workout, - ) => - (super.noSuchMethod( - Invocation.method( - #addDay, - [ - day, - workout, - ], + _i12.Future<_i6.Day> addDay(_i6.Day? day, _i5.WorkoutPlan? workout) => (super.noSuchMethod( + Invocation.method(#addDay, [day, workout]), + returnValue: _i12.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day, workout])), ), - returnValue: _i12.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [ - day, - workout, - ], - ), - )), ) as _i12.Future<_i6.Day>); @override _i12.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), + Invocation.method(#editDay, [day]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future deleteDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [day], - ), + Invocation.method(#deleteDay, [day]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future<_i7.Set> addSet(_i7.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #addSet, - [workoutSet], + Invocation.method(#addSet, [workoutSet]), + returnValue: _i12.Future<_i7.Set>.value( + _FakeSet_5(this, Invocation.method(#addSet, [workoutSet])), ), - returnValue: _i12.Future<_i7.Set>.value(_FakeSet_5( - this, - Invocation.method( - #addSet, - [workoutSet], - ), - )), ) as _i12.Future<_i7.Set>); @override _i12.Future editSet(_i7.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #editSet, - [workoutSet], - ), + Invocation.method(#editSet, [workoutSet]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @@ -450,22 +307,13 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv int? startIndex, ) => (super.noSuchMethod( - Invocation.method( - #reorderSets, - [ - sets, - startIndex, - ], - ), + Invocation.method(#reorderSets, [sets, startIndex]), returnValue: _i12.Future>.value(<_i7.Set>[]), ) as _i12.Future>); @override _i12.Future fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #fetchComputedSettings, - [workoutSet], - ), + Invocation.method(#fetchComputedSettings, [workoutSet]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @@ -476,132 +324,86 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv _i14.Translation? exercise, ) => (super.noSuchMethod( - Invocation.method( - #fetchSmartText, - [ - workoutSet, - exercise, - ], - ), - returnValue: _i12.Future.value(_i15.dummyValue( - this, - Invocation.method( - #fetchSmartText, - [ - workoutSet, - exercise, - ], + Invocation.method(#fetchSmartText, [workoutSet, exercise]), + returnValue: _i12.Future.value( + _i15.dummyValue( + this, + Invocation.method(#fetchSmartText, [workoutSet, exercise]), ), - )), + ), ) as _i12.Future); @override _i12.Future deleteSet(_i7.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #deleteSet, - [workoutSet], - ), + Invocation.method(#deleteSet, [workoutSet]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) => (super.noSuchMethod( - Invocation.method( - #addSetting, - [workoutSetting], - ), - returnValue: _i12.Future<_i8.Setting>.value(_FakeSetting_6( - this, - Invocation.method( - #addSetting, - [workoutSetting], + Invocation.method(#addSetting, [workoutSetting]), + returnValue: _i12.Future<_i8.Setting>.value( + _FakeSetting_6( + this, + Invocation.method(#addSetting, [workoutSetting]), ), - )), + ), ) as _i12.Future<_i8.Setting>); @override _i12.Future fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), + Invocation.method(#fetchSessionData, []), returnValue: _i12.Future.value(), ) as _i12.Future); @override _i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #addSession, - [session], - ), - returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7( - this, - Invocation.method( - #addSession, - [session], + Invocation.method(#addSession, [session]), + returnValue: _i12.Future<_i9.WorkoutSession>.value( + _FakeWorkoutSession_7( + this, + Invocation.method(#addSession, [session]), ), - )), + ), ) as _i12.Future<_i9.WorkoutSession>); @override _i12.Future<_i10.Log> addLog(_i10.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], + Invocation.method(#addLog, [log]), + returnValue: _i12.Future<_i10.Log>.value( + _FakeLog_8(this, Invocation.method(#addLog, [log])), ), - returnValue: _i12.Future<_i10.Log>.value(_FakeLog_8( - this, - Invocation.method( - #addLog, - [log], - ), - )), ) as _i12.Future<_i10.Log>); @override _i12.Future deleteLog(_i10.Log? log) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [log], - ), + Invocation.method(#deleteLog, [log]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } diff --git a/test/workout/workout_form_test.mocks.dart b/test/workout/workout_form_test.mocks.dart index 6d97eca7..53a53f75 100644 --- a/test/workout/workout_form_test.mocks.dart +++ b/test/workout/workout_form_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/workout/workout_form_test.dart. // Do not manually edit this file. @@ -29,99 +29,49 @@ import 'package:wger/providers/workout_plans.dart' as _i11; // 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: must_be_immutable // 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, - ); + _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, - ); + _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, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWorkoutPlan_3 extends _i1.SmartFake implements _i5.WorkoutPlan { - _FakeWorkoutPlan_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutPlan_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, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSet_5 extends _i1.SmartFake implements _i7.Set { - _FakeSet_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSet_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSetting_6 extends _i1.SmartFake implements _i8.Setting { - _FakeSetting_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSetting_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession { - _FakeWorkoutSession_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_8 extends _i1.SmartFake implements _i10.Log { - _FakeLog_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_8(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [WorkoutPlansProvider]. @@ -178,152 +128,105 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv ) as _i4.RepetitionUnit); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override List<_i5.WorkoutPlan> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), + Invocation.method(#getPlans, []), returnValue: <_i5.WorkoutPlan>[], ) as List<_i5.WorkoutPlan>); @override _i5.WorkoutPlan findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), returnValue: _FakeWorkoutPlan_3( this, - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), ), ) as _i5.WorkoutPlan); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), + Invocation.method(#findIndexById, [id]), returnValue: 0, ) as int); @override void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method( - #setCurrentPlan, - [id], - ), + Invocation.method(#setCurrentPlan, [id]), returnValueForMissingStub: null, ); @override void resetCurrentPlan() => super.noSuchMethod( - Invocation.method( - #resetCurrentPlan, - [], - ), + Invocation.method(#resetCurrentPlan, []), returnValueForMissingStub: null, ); @override _i12.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), + Invocation.method(#fetchAndSetAllPlansFull, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), + Invocation.method(#fetchAndSetAllPlansSparse, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i12.Future<_i5.WorkoutPlan>.value(_FakeWorkoutPlan_3( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i12.Future<_i5.WorkoutPlan>.value( + _FakeWorkoutPlan_3( + this, + Invocation.method(#fetchAndSetPlanSparse, [planId]), ), - )), + ), ) as _i12.Future<_i5.WorkoutPlan>); @override _i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWorkoutPlanFull, - [workoutId], - ), - returnValue: _i12.Future<_i5.WorkoutPlan>.value(_FakeWorkoutPlan_3( - this, - Invocation.method( - #fetchAndSetWorkoutPlanFull, - [workoutId], + Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]), + returnValue: _i12.Future<_i5.WorkoutPlan>.value( + _FakeWorkoutPlan_3( + this, + Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]), ), - )), + ), ) as _i12.Future<_i5.WorkoutPlan>); @override _i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod( - Invocation.method( - #addWorkout, - [workout], - ), - returnValue: _i12.Future<_i5.WorkoutPlan>.value(_FakeWorkoutPlan_3( - this, - Invocation.method( - #addWorkout, - [workout], + Invocation.method(#addWorkout, [workout]), + returnValue: _i12.Future<_i5.WorkoutPlan>.value( + _FakeWorkoutPlan_3( + this, + Invocation.method(#addWorkout, [workout]), ), - )), + ), ) as _i12.Future<_i5.WorkoutPlan>); @override _i12.Future editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod( - Invocation.method( - #editWorkout, - [workout], - ), + Invocation.method(#editWorkout, [workout]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future deleteWorkout(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteWorkout, - [id], - ), + Invocation.method(#deleteWorkout, [id]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @@ -334,112 +237,66 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv _i13.Exercise? base, ) => (super.noSuchMethod( - Invocation.method( - #fetchLogData, - [ - workout, - base, - ], + Invocation.method(#fetchLogData, [workout, base]), + returnValue: _i12.Future>.value( + {}, ), - returnValue: _i12.Future>.value({}), ) as _i12.Future>); @override _i12.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), + Invocation.method(#fetchAndSetRepetitionUnits, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), + Invocation.method(#fetchAndSetWeightUnits, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), + Invocation.method(#fetchAndSetUnits, []), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override - _i12.Future<_i6.Day> addDay( - _i6.Day? day, - _i5.WorkoutPlan? workout, - ) => - (super.noSuchMethod( - Invocation.method( - #addDay, - [ - day, - workout, - ], + _i12.Future<_i6.Day> addDay(_i6.Day? day, _i5.WorkoutPlan? workout) => (super.noSuchMethod( + Invocation.method(#addDay, [day, workout]), + returnValue: _i12.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day, workout])), ), - returnValue: _i12.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [ - day, - workout, - ], - ), - )), ) as _i12.Future<_i6.Day>); @override _i12.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), + Invocation.method(#editDay, [day]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future deleteDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [day], - ), + Invocation.method(#deleteDay, [day]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future<_i7.Set> addSet(_i7.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #addSet, - [workoutSet], + Invocation.method(#addSet, [workoutSet]), + returnValue: _i12.Future<_i7.Set>.value( + _FakeSet_5(this, Invocation.method(#addSet, [workoutSet])), ), - returnValue: _i12.Future<_i7.Set>.value(_FakeSet_5( - this, - Invocation.method( - #addSet, - [workoutSet], - ), - )), ) as _i12.Future<_i7.Set>); @override _i12.Future editSet(_i7.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #editSet, - [workoutSet], - ), + Invocation.method(#editSet, [workoutSet]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @@ -450,22 +307,13 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv int? startIndex, ) => (super.noSuchMethod( - Invocation.method( - #reorderSets, - [ - sets, - startIndex, - ], - ), + Invocation.method(#reorderSets, [sets, startIndex]), returnValue: _i12.Future>.value(<_i7.Set>[]), ) as _i12.Future>); @override _i12.Future fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #fetchComputedSettings, - [workoutSet], - ), + Invocation.method(#fetchComputedSettings, [workoutSet]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @@ -476,132 +324,86 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv _i14.Translation? exercise, ) => (super.noSuchMethod( - Invocation.method( - #fetchSmartText, - [ - workoutSet, - exercise, - ], - ), - returnValue: _i12.Future.value(_i15.dummyValue( - this, - Invocation.method( - #fetchSmartText, - [ - workoutSet, - exercise, - ], + Invocation.method(#fetchSmartText, [workoutSet, exercise]), + returnValue: _i12.Future.value( + _i15.dummyValue( + this, + Invocation.method(#fetchSmartText, [workoutSet, exercise]), ), - )), + ), ) as _i12.Future); @override _i12.Future deleteSet(_i7.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #deleteSet, - [workoutSet], - ), + Invocation.method(#deleteSet, [workoutSet]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override _i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) => (super.noSuchMethod( - Invocation.method( - #addSetting, - [workoutSetting], - ), - returnValue: _i12.Future<_i8.Setting>.value(_FakeSetting_6( - this, - Invocation.method( - #addSetting, - [workoutSetting], + Invocation.method(#addSetting, [workoutSetting]), + returnValue: _i12.Future<_i8.Setting>.value( + _FakeSetting_6( + this, + Invocation.method(#addSetting, [workoutSetting]), ), - )), + ), ) as _i12.Future<_i8.Setting>); @override _i12.Future fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), + Invocation.method(#fetchSessionData, []), returnValue: _i12.Future.value(), ) as _i12.Future); @override _i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #addSession, - [session], - ), - returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7( - this, - Invocation.method( - #addSession, - [session], + Invocation.method(#addSession, [session]), + returnValue: _i12.Future<_i9.WorkoutSession>.value( + _FakeWorkoutSession_7( + this, + Invocation.method(#addSession, [session]), ), - )), + ), ) as _i12.Future<_i9.WorkoutSession>); @override _i12.Future<_i10.Log> addLog(_i10.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], + Invocation.method(#addLog, [log]), + returnValue: _i12.Future<_i10.Log>.value( + _FakeLog_8(this, Invocation.method(#addLog, [log])), ), - returnValue: _i12.Future<_i10.Log>.value(_FakeLog_8( - this, - Invocation.method( - #addLog, - [log], - ), - )), ) as _i12.Future<_i10.Log>); @override _i12.Future deleteLog(_i10.Log? log) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [log], - ), + Invocation.method(#deleteLog, [log]), returnValue: _i12.Future.value(), returnValueForMissingStub: _i12.Future.value(), ) as _i12.Future); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } diff --git a/test/workout/workout_plan_screen_test.mocks.dart b/test/workout/workout_plan_screen_test.mocks.dart index a4f438a6..566bf678 100644 --- a/test/workout/workout_plan_screen_test.mocks.dart +++ b/test/workout/workout_plan_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/workout/workout_plan_screen_test.dart. // Do not manually edit this file. @@ -18,49 +18,26 @@ import 'package:wger/providers/base_provider.dart' as _i4; // 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: must_be_immutable // 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 _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { - _FakeAuthProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { - _FakeClient_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_2 extends _i1.SmartFake implements Uri { - _FakeUri_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response { - _FakeResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [WgerBaseProvider]. @@ -74,46 +51,32 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { @override _i2.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), ) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter( - #auth, - _auth, - ), + Invocation.setter(#auth, _auth), returnValueForMissingStub: null, ); @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), ) as _i3.Client); @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), returnValue: {}, ) as Map); @@ -128,58 +91,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), ), ) as Uri); @override _i5.Future> fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), + Invocation.method(#fetchPaginated, [uri]), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i5.Future> post(Map? data, Uri? uri) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -188,38 +132,20 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#deleteRequest, [url, id]), ), - )), + ), ) as _i5.Future<_i3.Response>); } diff --git a/test/workout/workout_plans_screen_test.mocks.dart b/test/workout/workout_plans_screen_test.mocks.dart index 29738eb6..0eb0af70 100644 --- a/test/workout/workout_plans_screen_test.mocks.dart +++ b/test/workout/workout_plans_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/workout/workout_plans_screen_test.dart. // Do not manually edit this file. @@ -18,49 +18,26 @@ import 'package:wger/providers/base_provider.dart' as _i4; // 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: must_be_immutable // 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 _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { - _FakeAuthProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { - _FakeClient_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_2 extends _i1.SmartFake implements Uri { - _FakeUri_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response { - _FakeResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [WgerBaseProvider]. @@ -74,46 +51,32 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { @override _i2.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), ) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter( - #auth, - _auth, - ), + Invocation.setter(#auth, _auth), returnValueForMissingStub: null, ); @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), ) as _i3.Client); @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), returnValue: {}, ) as Map); @@ -128,58 +91,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), ), ) as Uri); @override _i5.Future> fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), + Invocation.method(#fetchPaginated, [uri]), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i5.Future> post(Map? data, Uri? uri) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -188,38 +132,20 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#deleteRequest, [url, id]), ), - )), + ), ) as _i5.Future<_i3.Response>); } diff --git a/test/workout/workout_provider_test.mocks.dart b/test/workout/workout_provider_test.mocks.dart index 3b79f989..bf831382 100644 --- a/test/workout/workout_provider_test.mocks.dart +++ b/test/workout/workout_provider_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/workout/workout_provider_test.dart. // Do not manually edit this file. @@ -18,49 +18,26 @@ import 'package:wger/providers/base_provider.dart' as _i4; // 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: must_be_immutable // 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 _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { - _FakeAuthProvider_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { - _FakeClient_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_2 extends _i1.SmartFake implements Uri { - _FakeUri_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response { - _FakeResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [WgerBaseProvider]. @@ -74,46 +51,32 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { @override _i2.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), ) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter( - #auth, - _auth, - ), + Invocation.setter(#auth, _auth), returnValueForMissingStub: null, ); @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), ) as _i3.Client); @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), returnValue: {}, ) as Map); @@ -128,58 +91,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), ), ) as Uri); @override _i5.Future> fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), + Invocation.method(#fetchPaginated, [uri]), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i5.Future> post(Map? data, Uri? uri) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -188,38 +132,20 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value( + {}, ), - returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method(#deleteRequest, [url, id]), ), - )), + ), ) as _i5.Future<_i3.Response>); } diff --git a/test/workout/workout_set_form_test.mocks.dart b/test/workout/workout_set_form_test.mocks.dart index 2fd9203d..733627ec 100644 --- a/test/workout/workout_set_form_test.mocks.dart +++ b/test/workout/workout_set_form_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in wger/test/workout/workout_set_form_test.dart. // Do not manually edit this file. @@ -37,199 +37,91 @@ import 'package:wger/providers/workout_plans.dart' as _i22; // 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: must_be_immutable // 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, - ); + _FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExerciseDatabase_1 extends _i1.SmartFake implements _i3.ExerciseDatabase { - _FakeExerciseDatabase_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseDatabase_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExercise_2 extends _i1.SmartFake implements _i4.Exercise { - _FakeExercise_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExercise_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeExerciseCategory_3 extends _i1.SmartFake implements _i5.ExerciseCategory { - _FakeExerciseCategory_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseCategory_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeEquipment_4 extends _i1.SmartFake implements _i6.Equipment { - _FakeEquipment_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeEquipment_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMuscle_5 extends _i1.SmartFake implements _i7.Muscle { - _FakeMuscle_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMuscle_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeLanguage_6 extends _i1.SmartFake implements _i8.Language { - _FakeLanguage_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLanguage_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeAuthProvider_7 extends _i1.SmartFake implements _i9.AuthProvider { - _FakeAuthProvider_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeClient_8 extends _i1.SmartFake implements _i10.Client { - _FakeClient_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_8(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_9 extends _i1.SmartFake implements Uri { - _FakeUri_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_10 extends _i1.SmartFake implements _i10.Response { - _FakeResponse_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_10(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWeightUnit_11 extends _i1.SmartFake implements _i11.WeightUnit { - _FakeWeightUnit_11( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightUnit_11(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeRepetitionUnit_12 extends _i1.SmartFake implements _i12.RepetitionUnit { - _FakeRepetitionUnit_12( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRepetitionUnit_12(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWorkoutPlan_13 extends _i1.SmartFake implements _i13.WorkoutPlan { - _FakeWorkoutPlan_13( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutPlan_13(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeDay_14 extends _i1.SmartFake implements _i14.Day { - _FakeDay_14( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDay_14(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSet_15 extends _i1.SmartFake implements _i15.Set { - _FakeSet_15( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSet_15(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSetting_16 extends _i1.SmartFake implements _i16.Setting { - _FakeSetting_16( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSetting_16(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_17 extends _i1.SmartFake implements _i17.WorkoutSession { - _FakeWorkoutSession_17( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_17(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_18 extends _i1.SmartFake implements _i18.Log { - _FakeLog_18( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_18(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [ExercisesProvider]. @@ -260,10 +152,7 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider { @override set database(_i3.ExerciseDatabase? _database) => super.noSuchMethod( - Invocation.setter( - #database, - _database, - ), + Invocation.setter(#database, _database), returnValueForMissingStub: null, ); @@ -275,10 +164,7 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider { @override set exercises(List<_i4.Exercise>? _exercises) => super.noSuchMethod( - Invocation.setter( - #exercises, - _exercises, - ), + Invocation.setter(#exercises, _exercises), returnValueForMissingStub: null, ); @@ -290,10 +176,7 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider { @override set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod( - Invocation.setter( - #filteredExercises, - newFilteredExercises, - ), + Invocation.setter(#filteredExercises, newFilteredExercises), returnValueForMissingStub: null, ); @@ -329,69 +212,46 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider { @override set languages(List<_i8.Language>? languages) => super.noSuchMethod( - Invocation.setter( - #languages, - languages, - ), + Invocation.setter(#languages, languages), returnValueForMissingStub: null, ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override _i20.Future setFilters(_i19.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #setFilters, - [newFilters], - ), + Invocation.method(#setFilters, [newFilters]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override void initFilters() => super.noSuchMethod( - Invocation.method( - #initFilters, - [], - ), + Invocation.method(#initFilters, []), returnValueForMissingStub: null, ); @override _i20.Future findByFilters() => (super.noSuchMethod( - Invocation.method( - #findByFilters, - [], - ), + Invocation.method(#findByFilters, []), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override _i4.Exercise findExerciseById(int? id) => (super.noSuchMethod( - Invocation.method( - #findExerciseById, - [id], - ), + Invocation.method(#findExerciseById, [id]), returnValue: _FakeExercise_2( this, - Invocation.method( - #findExerciseById, - [id], - ), + Invocation.method(#findExerciseById, [id]), ), ) as _i4.Exercise); @@ -411,117 +271,77 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider { @override _i5.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), + Invocation.method(#findCategoryById, [id]), returnValue: _FakeExerciseCategory_3( this, - Invocation.method( - #findCategoryById, - [id], - ), + Invocation.method(#findCategoryById, [id]), ), ) as _i5.ExerciseCategory); @override _i6.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method( - #findEquipmentById, - [id], - ), + Invocation.method(#findEquipmentById, [id]), returnValue: _FakeEquipment_4( this, - Invocation.method( - #findEquipmentById, - [id], - ), + Invocation.method(#findEquipmentById, [id]), ), ) as _i6.Equipment); @override _i7.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method( - #findMuscleById, - [id], - ), + Invocation.method(#findMuscleById, [id]), returnValue: _FakeMuscle_5( this, - Invocation.method( - #findMuscleById, - [id], - ), + Invocation.method(#findMuscleById, [id]), ), ) as _i7.Muscle); @override _i8.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method( - #findLanguageById, - [id], - ), + Invocation.method(#findLanguageById, [id]), returnValue: _FakeLanguage_6( this, - Invocation.method( - #findLanguageById, - [id], - ), + Invocation.method(#findLanguageById, [id]), ), ) as _i8.Language); @override _i20.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoriesFromApi, - [], - ), + Invocation.method(#fetchAndSetCategoriesFromApi, []), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMusclesFromApi, - [], - ), + Invocation.method(#fetchAndSetMusclesFromApi, []), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipmentsFromApi, - [], - ), + Invocation.method(#fetchAndSetEquipmentsFromApi, []), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguagesFromApi, - [], - ), + Invocation.method(#fetchAndSetLanguagesFromApi, []), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future<_i4.Exercise> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetExercise, - [exerciseId], - ), - returnValue: _i20.Future<_i4.Exercise>.value(_FakeExercise_2( - this, - Invocation.method( - #fetchAndSetExercise, - [exerciseId], + Invocation.method(#fetchAndSetExercise, [exerciseId]), + returnValue: _i20.Future<_i4.Exercise>.value( + _FakeExercise_2( + this, + Invocation.method(#fetchAndSetExercise, [exerciseId]), ), - )), + ), ) as _i20.Future<_i4.Exercise>); @override @@ -530,52 +350,40 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider { int? exerciseId, ) => (super.noSuchMethod( - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - returnValue: _i20.Future<_i4.Exercise>.value(_FakeExercise_2( - this, - Invocation.method( - #handleUpdateExerciseFromApi, - [ + Invocation.method(#handleUpdateExerciseFromApi, [ + database, + exerciseId, + ]), + returnValue: _i20.Future<_i4.Exercise>.value( + _FakeExercise_2( + this, + Invocation.method(#handleUpdateExerciseFromApi, [ database, exerciseId, - ], + ]), ), - )), + ), ) as _i20.Future<_i4.Exercise>); @override _i20.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod( - Invocation.method( - #initCacheTimesLocalPrefs, - [], - {#forceInit: forceInit}, - ), + Invocation.method(#initCacheTimesLocalPrefs, [], { + #forceInit: forceInit, + }), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future clearAllCachesAndPrefs() => (super.noSuchMethod( - Invocation.method( - #clearAllCachesAndPrefs, - [], - ), + Invocation.method(#clearAllCachesAndPrefs, []), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetInitialData, - [], - ), + Invocation.method(#fetchAndSetInitialData, []), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @@ -597,50 +405,35 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider { @override _i20.Future updateExerciseCache(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #updateExerciseCache, - [database], - ), + Invocation.method(#updateExerciseCache, [database]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future fetchAndSetMuscles(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMuscles, - [database], - ), + Invocation.method(#fetchAndSetMuscles, [database]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future fetchAndSetCategories(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [database], - ), + Invocation.method(#fetchAndSetCategories, [database]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future fetchAndSetLanguages(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguages, - [database], - ), + Invocation.method(#fetchAndSetLanguages, [database]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future fetchAndSetEquipments(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipments, - [database], - ), + Invocation.method(#fetchAndSetEquipments, [database]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @@ -648,54 +441,41 @@ class MockExercisesProvider extends _i1.Mock implements _i19.ExercisesProvider { @override _i20.Future> searchExercise( String? name, { - String? languageCode = r'en', + String? languageCode = 'en', bool? searchEnglish = false, }) => (super.noSuchMethod( Invocation.method( #searchExercise, [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i20.Future>.value( + <_i4.Exercise>[], ), - returnValue: _i20.Future>.value(<_i4.Exercise>[]), ) as _i20.Future>); @override void addListener(_i21.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i21.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); } @@ -711,46 +491,32 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider { @override _i9.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_7( - this, - Invocation.getter(#auth), - ), + returnValue: _FakeAuthProvider_7(this, Invocation.getter(#auth)), ) as _i9.AuthProvider); @override set auth(_i9.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter( - #auth, - _auth, - ), + Invocation.setter(#auth, _auth), returnValueForMissingStub: null, ); @override _i10.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_8( - this, - Invocation.getter(#client), - ), + returnValue: _FakeClient_8(this, Invocation.getter(#client)), ) as _i10.Client); @override set client(_i10.Client? _client) => super.noSuchMethod( - Invocation.setter( - #client, - _client, - ), + Invocation.setter(#client, _client), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), + Invocation.method(#getDefaultHeaders, [], { + #includeAuth: includeAuth, + }), returnValue: {}, ) as Map); @@ -765,41 +531,29 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider { Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), returnValue: _FakeUri_9( this, Invocation.method( #makeUrl, [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, + {#id: id, #objectMethod: objectMethod, #query: query}, ), ), ) as Uri); @override _i20.Future> fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], + Invocation.method(#fetch, [uri]), + returnValue: _i20.Future>.value( + {}, ), - returnValue: _i20.Future>.value({}), ) as _i20.Future>); @override _i20.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), + Invocation.method(#fetchPaginated, [uri]), returnValue: _i20.Future>.value([]), ) as _i20.Future>); @@ -809,14 +563,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], + Invocation.method(#post, [data, uri]), + returnValue: _i20.Future>.value( + {}, ), - returnValue: _i20.Future>.value({}), ) as _i20.Future>); @override @@ -825,39 +575,21 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], + Invocation.method(#patch, [data, uri]), + returnValue: _i20.Future>.value( + {}, ), - returnValue: _i20.Future>.value({}), ) as _i20.Future>); @override - _i20.Future<_i10.Response> deleteRequest( - String? url, - int? id, - ) => - (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i20.Future<_i10.Response>.value(_FakeResponse_10( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], + _i20.Future<_i10.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i20.Future<_i10.Response>.value( + _FakeResponse_10( + this, + Invocation.method(#deleteRequest, [url, id]), ), - )), + ), ) as _i20.Future<_i10.Response>); } @@ -915,152 +647,105 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProv ) as _i12.RepetitionUnit); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), + Invocation.method(#clear, []), returnValueForMissingStub: null, ); @override List<_i13.WorkoutPlan> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), + Invocation.method(#getPlans, []), returnValue: <_i13.WorkoutPlan>[], ) as List<_i13.WorkoutPlan>); @override _i13.WorkoutPlan findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), returnValue: _FakeWorkoutPlan_13( this, - Invocation.method( - #findById, - [id], - ), + Invocation.method(#findById, [id]), ), ) as _i13.WorkoutPlan); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method( - #findIndexById, - [id], - ), + Invocation.method(#findIndexById, [id]), returnValue: 0, ) as int); @override void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method( - #setCurrentPlan, - [id], - ), + Invocation.method(#setCurrentPlan, [id]), returnValueForMissingStub: null, ); @override void resetCurrentPlan() => super.noSuchMethod( - Invocation.method( - #resetCurrentPlan, - [], - ), + Invocation.method(#resetCurrentPlan, []), returnValueForMissingStub: null, ); @override _i20.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), + Invocation.method(#fetchAndSetAllPlansFull, []), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), + Invocation.method(#fetchAndSetAllPlansSparse, []), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future<_i13.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i20.Future<_i13.WorkoutPlan>.value(_FakeWorkoutPlan_13( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i20.Future<_i13.WorkoutPlan>.value( + _FakeWorkoutPlan_13( + this, + Invocation.method(#fetchAndSetPlanSparse, [planId]), ), - )), + ), ) as _i20.Future<_i13.WorkoutPlan>); @override _i20.Future<_i13.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWorkoutPlanFull, - [workoutId], - ), - returnValue: _i20.Future<_i13.WorkoutPlan>.value(_FakeWorkoutPlan_13( - this, - Invocation.method( - #fetchAndSetWorkoutPlanFull, - [workoutId], + Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]), + returnValue: _i20.Future<_i13.WorkoutPlan>.value( + _FakeWorkoutPlan_13( + this, + Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]), ), - )), + ), ) as _i20.Future<_i13.WorkoutPlan>); @override _i20.Future<_i13.WorkoutPlan> addWorkout(_i13.WorkoutPlan? workout) => (super.noSuchMethod( - Invocation.method( - #addWorkout, - [workout], - ), - returnValue: _i20.Future<_i13.WorkoutPlan>.value(_FakeWorkoutPlan_13( - this, - Invocation.method( - #addWorkout, - [workout], + Invocation.method(#addWorkout, [workout]), + returnValue: _i20.Future<_i13.WorkoutPlan>.value( + _FakeWorkoutPlan_13( + this, + Invocation.method(#addWorkout, [workout]), ), - )), + ), ) as _i20.Future<_i13.WorkoutPlan>); @override _i20.Future editWorkout(_i13.WorkoutPlan? workout) => (super.noSuchMethod( - Invocation.method( - #editWorkout, - [workout], - ), + Invocation.method(#editWorkout, [workout]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future deleteWorkout(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteWorkout, - [id], - ), + Invocation.method(#deleteWorkout, [id]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @@ -1071,112 +756,66 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProv _i4.Exercise? base, ) => (super.noSuchMethod( - Invocation.method( - #fetchLogData, - [ - workout, - base, - ], + Invocation.method(#fetchLogData, [workout, base]), + returnValue: _i20.Future>.value( + {}, ), - returnValue: _i20.Future>.value({}), ) as _i20.Future>); @override _i20.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), + Invocation.method(#fetchAndSetRepetitionUnits, []), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), + Invocation.method(#fetchAndSetWeightUnits, []), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), + Invocation.method(#fetchAndSetUnits, []), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override - _i20.Future<_i14.Day> addDay( - _i14.Day? day, - _i13.WorkoutPlan? workout, - ) => - (super.noSuchMethod( - Invocation.method( - #addDay, - [ - day, - workout, - ], + _i20.Future<_i14.Day> addDay(_i14.Day? day, _i13.WorkoutPlan? workout) => (super.noSuchMethod( + Invocation.method(#addDay, [day, workout]), + returnValue: _i20.Future<_i14.Day>.value( + _FakeDay_14(this, Invocation.method(#addDay, [day, workout])), ), - returnValue: _i20.Future<_i14.Day>.value(_FakeDay_14( - this, - Invocation.method( - #addDay, - [ - day, - workout, - ], - ), - )), ) as _i20.Future<_i14.Day>); @override _i20.Future editDay(_i14.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), + Invocation.method(#editDay, [day]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future deleteDay(_i14.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [day], - ), + Invocation.method(#deleteDay, [day]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future<_i15.Set> addSet(_i15.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #addSet, - [workoutSet], + Invocation.method(#addSet, [workoutSet]), + returnValue: _i20.Future<_i15.Set>.value( + _FakeSet_15(this, Invocation.method(#addSet, [workoutSet])), ), - returnValue: _i20.Future<_i15.Set>.value(_FakeSet_15( - this, - Invocation.method( - #addSet, - [workoutSet], - ), - )), ) as _i20.Future<_i15.Set>); @override _i20.Future editSet(_i15.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #editSet, - [workoutSet], - ), + Invocation.method(#editSet, [workoutSet]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @@ -1187,22 +826,13 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProv int? startIndex, ) => (super.noSuchMethod( - Invocation.method( - #reorderSets, - [ - sets, - startIndex, - ], - ), + Invocation.method(#reorderSets, [sets, startIndex]), returnValue: _i20.Future>.value(<_i15.Set>[]), ) as _i20.Future>); @override _i20.Future fetchComputedSettings(_i15.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #fetchComputedSettings, - [workoutSet], - ), + Invocation.method(#fetchComputedSettings, [workoutSet]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @@ -1213,132 +843,86 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i22.WorkoutPlansProv _i23.Translation? exercise, ) => (super.noSuchMethod( - Invocation.method( - #fetchSmartText, - [ - workoutSet, - exercise, - ], - ), - returnValue: _i20.Future.value(_i24.dummyValue( - this, - Invocation.method( - #fetchSmartText, - [ - workoutSet, - exercise, - ], + Invocation.method(#fetchSmartText, [workoutSet, exercise]), + returnValue: _i20.Future.value( + _i24.dummyValue( + this, + Invocation.method(#fetchSmartText, [workoutSet, exercise]), ), - )), + ), ) as _i20.Future); @override _i20.Future deleteSet(_i15.Set? workoutSet) => (super.noSuchMethod( - Invocation.method( - #deleteSet, - [workoutSet], - ), + Invocation.method(#deleteSet, [workoutSet]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override _i20.Future<_i16.Setting> addSetting(_i16.Setting? workoutSetting) => (super.noSuchMethod( - Invocation.method( - #addSetting, - [workoutSetting], - ), - returnValue: _i20.Future<_i16.Setting>.value(_FakeSetting_16( - this, - Invocation.method( - #addSetting, - [workoutSetting], + Invocation.method(#addSetting, [workoutSetting]), + returnValue: _i20.Future<_i16.Setting>.value( + _FakeSetting_16( + this, + Invocation.method(#addSetting, [workoutSetting]), ), - )), + ), ) as _i20.Future<_i16.Setting>); @override _i20.Future fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), + Invocation.method(#fetchSessionData, []), returnValue: _i20.Future.value(), ) as _i20.Future); @override _i20.Future<_i17.WorkoutSession> addSession(_i17.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #addSession, - [session], - ), - returnValue: _i20.Future<_i17.WorkoutSession>.value(_FakeWorkoutSession_17( - this, - Invocation.method( - #addSession, - [session], + Invocation.method(#addSession, [session]), + returnValue: _i20.Future<_i17.WorkoutSession>.value( + _FakeWorkoutSession_17( + this, + Invocation.method(#addSession, [session]), ), - )), + ), ) as _i20.Future<_i17.WorkoutSession>); @override _i20.Future<_i18.Log> addLog(_i18.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], + Invocation.method(#addLog, [log]), + returnValue: _i20.Future<_i18.Log>.value( + _FakeLog_18(this, Invocation.method(#addLog, [log])), ), - returnValue: _i20.Future<_i18.Log>.value(_FakeLog_18( - this, - Invocation.method( - #addLog, - [log], - ), - )), ) as _i20.Future<_i18.Log>); @override _i20.Future deleteLog(_i18.Log? log) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [log], - ), + Invocation.method(#deleteLog, [log]), returnValue: _i20.Future.value(), returnValueForMissingStub: _i20.Future.value(), ) as _i20.Future); @override void addListener(_i21.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), + Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override void removeListener(_i21.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), + Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), + Invocation.method(#dispose, []), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), + Invocation.method(#notifyListeners, []), returnValueForMissingStub: null, ); }