mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-02 10:09:11 +01:00
Inject the shared preferences class for easier testing
This commit is contained in:
@@ -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<void> _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 {
|
||||
|
||||
@@ -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<String, String>? 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<String, String>? 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<String, String>? 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<String, String>? 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<String> read(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
returnValue: _i3.Future<String>.value(_i5.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
_i3.Future<String> read(Uri? url, {Map<String, String>? headers}) => (super.noSuchMethod(
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
returnValue: _i3.Future<String>.value(
|
||||
_i5.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
),
|
||||
)),
|
||||
),
|
||||
) as _i3.Future<String>);
|
||||
|
||||
@override
|
||||
@@ -245,35 +181,24 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Map<String, String>? 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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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<String>? names) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#alternateNamesEn,
|
||||
names,
|
||||
),
|
||||
Invocation.setter(#alternateNamesEn, names),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set alternateNamesTrans(List<String>? 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<int> addExercise() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExercise,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<int>.value(0),
|
||||
) as _i13.Future<int>);
|
||||
_i14.Future<int> addExercise() => (super.noSuchMethod(
|
||||
Invocation.method(#addExercise, []),
|
||||
returnValue: _i14.Future<int>.value(0),
|
||||
) as _i14.Future<int>);
|
||||
|
||||
@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<void> addImages(_i3.Exercise? base) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addImages,
|
||||
[base],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
_i14.Future<void> addImages(_i3.Exercise? base) => (super.noSuchMethod(
|
||||
Invocation.method(#addImages, [base]),
|
||||
returnValue: _i14.Future<void>.value(),
|
||||
returnValueForMissingStub: _i14.Future<void>.value(),
|
||||
) as _i14.Future<void>);
|
||||
|
||||
@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<void> fetchAndSetProfile() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetProfile,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
_i14.Future<void> fetchAndSetProfile() => (super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetProfile, []),
|
||||
returnValue: _i14.Future<void>.value(),
|
||||
returnValueForMissingStub: _i14.Future<void>.value(),
|
||||
) as _i14.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> saveProfile() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveProfile,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
_i14.Future<void> saveProfile() => (super.noSuchMethod(
|
||||
Invocation.method(#saveProfile, []),
|
||||
returnValue: _i14.Future<void>.value(),
|
||||
returnValueForMissingStub: _i14.Future<void>.value(),
|
||||
) as _i14.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> verifyEmail() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#verifyEmail,
|
||||
[],
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
_i14.Future<void> verifyEmail() => (super.noSuchMethod(
|
||||
Invocation.method(#verifyEmail, []),
|
||||
returnValue: _i14.Future<void>.value(),
|
||||
returnValueForMissingStub: _i14.Future<void>.value(),
|
||||
) as _i14.Future<void>);
|
||||
|
||||
@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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<void> fetchAndSetGallery() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetGallery,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetGallery, []),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
_i6.Future<void> addImage(
|
||||
_i5.Image? image,
|
||||
_i7.XFile? imageFile,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addImage,
|
||||
[
|
||||
image,
|
||||
imageFile,
|
||||
],
|
||||
),
|
||||
_i6.Future<void> addImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod(
|
||||
Invocation.method(#addImage, [image, imageFile]),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
_i6.Future<void> editImage(
|
||||
_i5.Image? image,
|
||||
_i7.XFile? imageFile,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editImage,
|
||||
[
|
||||
image,
|
||||
imageFile,
|
||||
],
|
||||
),
|
||||
_i6.Future<void> editImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod(
|
||||
Invocation.method(#editImage, [image, imageFile]),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
_i6.Future<void> deleteImage(_i5.Image? image) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteImage,
|
||||
[image],
|
||||
),
|
||||
Invocation.method(#deleteImage, [image]),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
) as Map<String, String>);
|
||||
|
||||
@@ -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<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i6.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i6.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i6.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i6.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<void> fetchAndSetGallery() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetGallery,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetGallery, []),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
_i6.Future<void> addImage(
|
||||
_i5.Image? image,
|
||||
_i7.XFile? imageFile,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addImage,
|
||||
[
|
||||
image,
|
||||
imageFile,
|
||||
],
|
||||
),
|
||||
_i6.Future<void> addImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod(
|
||||
Invocation.method(#addImage, [image, imageFile]),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
_i6.Future<void> editImage(
|
||||
_i5.Image? image,
|
||||
_i7.XFile? imageFile,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editImage,
|
||||
[
|
||||
image,
|
||||
imageFile,
|
||||
],
|
||||
),
|
||||
_i6.Future<void> editImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod(
|
||||
Invocation.method(#editImage, [image, imageFile]),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
_i6.Future<void> deleteImage(_i5.Image? image) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteImage,
|
||||
[image],
|
||||
),
|
||||
Invocation.method(#deleteImage, [image]),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
) as Map<String, String>);
|
||||
|
||||
@@ -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<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i6.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i6.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i6.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i6.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<void> fetchAndSetCategories() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategories,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetCategories, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> fetchAndSetCategoryEntries(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategoryEntries,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#fetchAndSetCategoryEntries, [id]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> fetchAndSetAllCategoriesAndEntries() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllCategoriesAndEntries,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllCategoriesAndEntries, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addCategory,
|
||||
[category],
|
||||
),
|
||||
Invocation.method(#addCategory, [category]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteCategory(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteCategory,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#deleteCategory, [id]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> editCategory(
|
||||
int? id,
|
||||
String? newName,
|
||||
String? newUnit,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editCategory,
|
||||
[
|
||||
id,
|
||||
newName,
|
||||
newUnit,
|
||||
],
|
||||
),
|
||||
_i5.Future<void> editCategory(int? id, String? newName, String? newUnit) => (super.noSuchMethod(
|
||||
Invocation.method(#editCategory, [id, newName, newUnit]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> addEntry(_i6.MeasurementEntry? entry) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addEntry,
|
||||
[entry],
|
||||
),
|
||||
Invocation.method(#addEntry, [entry]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteEntry(
|
||||
int? id,
|
||||
int? categoryId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteEntry,
|
||||
[
|
||||
id,
|
||||
categoryId,
|
||||
],
|
||||
),
|
||||
_i5.Future<void> deleteEntry(int? id, int? categoryId) => (super.noSuchMethod(
|
||||
Invocation.method(#deleteEntry, [id, categoryId]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@@ -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<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
) as Map<String, String>);
|
||||
|
||||
@@ -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<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@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>);
|
||||
}
|
||||
|
||||
@@ -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<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansSparse, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetAllPlansFull() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansFull,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansFull, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@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<void> editPlan(_i4.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editPlan,
|
||||
[plan],
|
||||
),
|
||||
Invocation.method(#editPlan, [plan]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> deletePlan(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deletePlan,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#deletePlan, [id]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@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<void> deleteMeal(_i5.Meal? meal) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMeal,
|
||||
[meal],
|
||||
),
|
||||
Invocation.method(#deleteMeal, [meal]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
@@ -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<void> deleteMealItem(_i6.MealItem? mealItem) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
),
|
||||
Invocation.method(#deleteMealItem, [mealItem]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> clearIngredientCache() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearIngredientCache,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#clearIngredientCache, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
@@ -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<void> fetchIngredientsFromCache() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchIngredientsFromCache,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchIngredientsFromCache, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
@@ -395,37 +276,29 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<List<_i10.IngredientApiSearchEntry>> 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<List<_i10.IngredientApiSearchEntry>>.value(
|
||||
<_i10.IngredientApiSearchEntry>[]),
|
||||
<_i10.IngredientApiSearchEntry>[],
|
||||
),
|
||||
) as _i9.Future<List<_i10.IngredientApiSearchEntry>>);
|
||||
|
||||
@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<void> logMealToDiary(_i5.Meal? meal) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#logMealToDiary,
|
||||
[meal],
|
||||
),
|
||||
Invocation.method(#logMealToDiary, [meal]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
@@ -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<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> deleteLog(
|
||||
int? logId,
|
||||
int? planId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[
|
||||
logId,
|
||||
planId,
|
||||
],
|
||||
),
|
||||
_i9.Future<void> deleteLog(int? logId, int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, planId]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
),
|
||||
Invocation.method(#fetchAndSetLogs, [plan]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansSparse, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetAllPlansFull() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansFull,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansFull, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@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<void> editPlan(_i4.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editPlan,
|
||||
[plan],
|
||||
),
|
||||
Invocation.method(#editPlan, [plan]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> deletePlan(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deletePlan,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#deletePlan, [id]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@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<void> deleteMeal(_i5.Meal? meal) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMeal,
|
||||
[meal],
|
||||
),
|
||||
Invocation.method(#deleteMeal, [meal]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
@@ -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<void> deleteMealItem(_i6.MealItem? mealItem) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
),
|
||||
Invocation.method(#deleteMealItem, [mealItem]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> clearIngredientCache() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearIngredientCache,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#clearIngredientCache, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
@@ -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<void> fetchIngredientsFromCache() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchIngredientsFromCache,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchIngredientsFromCache, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
@@ -395,37 +276,29 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<List<_i10.IngredientApiSearchEntry>> 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<List<_i10.IngredientApiSearchEntry>>.value(
|
||||
<_i10.IngredientApiSearchEntry>[]),
|
||||
<_i10.IngredientApiSearchEntry>[],
|
||||
),
|
||||
) as _i9.Future<List<_i10.IngredientApiSearchEntry>>);
|
||||
|
||||
@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<void> logMealToDiary(_i5.Meal? meal) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#logMealToDiary,
|
||||
[meal],
|
||||
),
|
||||
Invocation.method(#logMealToDiary, [meal]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
@@ -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<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> deleteLog(
|
||||
int? logId,
|
||||
int? planId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[
|
||||
logId,
|
||||
planId,
|
||||
],
|
||||
),
|
||||
_i9.Future<void> deleteLog(int? logId, int? planId) => (super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, planId]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
),
|
||||
Invocation.method(#fetchAndSetLogs, [plan]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
|
||||
@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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
) as Map<String, String>);
|
||||
|
||||
@@ -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<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@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<String, String>? _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<void> setServerVersion() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setServerVersion,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#setServerVersion, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> setApplicationVersion() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setApplicationVersion,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#setApplicationVersion, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> initVersions(String? serverUrl) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initVersions,
|
||||
[serverUrl],
|
||||
),
|
||||
Invocation.method(#initVersions, [serverUrl]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@@ -379,13 +260,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
Map<String, String>? metadata,
|
||||
]) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#applicationUpdateRequired,
|
||||
[
|
||||
version,
|
||||
metadata,
|
||||
],
|
||||
),
|
||||
Invocation.method(#applicationUpdateRequired, [version, metadata]),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
|
||||
@@ -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<Map<String, _i2.LoginActions>>.value(
|
||||
<String, _i2.LoginActions>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(<String, _i2.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i2.LoginActions>>);
|
||||
|
||||
@override
|
||||
@@ -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<Map<String, _i2.LoginActions>>.value(
|
||||
<String, _i2.LoginActions>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(<String, _i2.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i2.LoginActions>>);
|
||||
|
||||
@override
|
||||
_i5.Future<String> getServerUrlFromPrefs() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getServerUrlFromPrefs,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<String>.value(_i7.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getServerUrlFromPrefs,
|
||||
[],
|
||||
Invocation.method(#getServerUrlFromPrefs, []),
|
||||
returnValue: _i5.Future<String>.value(
|
||||
_i7.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getServerUrlFromPrefs, []),
|
||||
),
|
||||
)),
|
||||
),
|
||||
) as _i5.Future<String>);
|
||||
|
||||
@override
|
||||
_i5.Future<bool> tryAutoLogin() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#tryAutoLogin,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#tryAutoLogin, []),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> logout({bool? shouldNotify = true}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#logout,
|
||||
[],
|
||||
{#shouldNotify: shouldNotify},
|
||||
),
|
||||
Invocation.method(#logout, [], {#shouldNotify: shouldNotify}),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
String getAppNameHeader() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getAppNameHeader,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#getAppNameHeader, []),
|
||||
returnValue: _i7.dummyValue<String>(
|
||||
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<String, String>? 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<String, String>? 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<String, String>? 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<String, String>? 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<String> read(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
returnValue: _i5.Future<String>.value(_i7.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
_i5.Future<String> read(Uri? url, {Map<String, String>? headers}) => (super.noSuchMethod(
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
returnValue: _i5.Future<String>.value(
|
||||
_i7.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
),
|
||||
)),
|
||||
),
|
||||
) as _i5.Future<String>);
|
||||
|
||||
@override
|
||||
@@ -718,35 +503,24 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
Map<String, String>? 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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<String, String>? _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<void> setServerVersion() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setServerVersion,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#setServerVersion, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> setApplicationVersion() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setApplicationVersion,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#setApplicationVersion, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> initVersions(String? serverUrl) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initVersions,
|
||||
[serverUrl],
|
||||
),
|
||||
Invocation.method(#initVersions, [serverUrl]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@@ -218,13 +150,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
Map<String, String>? metadata,
|
||||
]) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#applicationUpdateRequired,
|
||||
[
|
||||
version,
|
||||
metadata,
|
||||
],
|
||||
),
|
||||
Invocation.method(#applicationUpdateRequired, [version, metadata]),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
|
||||
@@ -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<Map<String, _i3.LoginActions>>.value(
|
||||
<String, _i3.LoginActions>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(<String, _i3.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i3.LoginActions>>);
|
||||
|
||||
@override
|
||||
@@ -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<Map<String, _i3.LoginActions>>.value(
|
||||
<String, _i3.LoginActions>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(<String, _i3.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i3.LoginActions>>);
|
||||
|
||||
@override
|
||||
_i5.Future<String> getServerUrlFromPrefs() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getServerUrlFromPrefs,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<String>.value(_i6.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getServerUrlFromPrefs,
|
||||
[],
|
||||
Invocation.method(#getServerUrlFromPrefs, []),
|
||||
returnValue: _i5.Future<String>.value(
|
||||
_i6.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getServerUrlFromPrefs, []),
|
||||
),
|
||||
)),
|
||||
),
|
||||
) as _i5.Future<String>);
|
||||
|
||||
@override
|
||||
_i5.Future<bool> tryAutoLogin() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#tryAutoLogin,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#tryAutoLogin, []),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> logout({bool? shouldNotify = true}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#logout,
|
||||
[],
|
||||
{#shouldNotify: shouldNotify},
|
||||
),
|
||||
Invocation.method(#logout, [], {#shouldNotify: shouldNotify}),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
String getAppNameHeader() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getAppNameHeader,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#getAppNameHeader, []),
|
||||
returnValue: _i6.dummyValue<String>(
|
||||
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<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
) as Map<String, String>);
|
||||
|
||||
@@ -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<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@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<String, String>? 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<String, String>? 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<String, String>? 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<String, String>? 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<String> read(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
returnValue: _i5.Future<String>.value(_i6.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
_i5.Future<String> read(Uri? url, {Map<String, String>? headers}) => (super.noSuchMethod(
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
returnValue: _i5.Future<String>.value(
|
||||
_i6.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
),
|
||||
)),
|
||||
),
|
||||
) as _i5.Future<String>);
|
||||
|
||||
@override
|
||||
@@ -718,35 +503,24 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Map<String, String>? 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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<String, String>? 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<String, String>? 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<String, String>? 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<String, String>? 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<String> read(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
returnValue: _i3.Future<String>.value(_i5.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
_i3.Future<String> read(Uri? url, {Map<String, String>? headers}) => (super.noSuchMethod(
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
returnValue: _i3.Future<String>.value(
|
||||
_i5.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
),
|
||||
)),
|
||||
),
|
||||
) as _i3.Future<String>);
|
||||
|
||||
@override
|
||||
@@ -245,35 +181,24 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Map<String, String>? 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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
) as Map<String, String>);
|
||||
|
||||
@@ -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<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@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>);
|
||||
}
|
||||
|
||||
@@ -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<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
) as Map<String, String>);
|
||||
|
||||
@@ -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<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@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>);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
) as Map<String, String>);
|
||||
|
||||
@@ -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<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i11.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i11.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i11.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i11.Future<List<dynamic>>);
|
||||
|
||||
@@ -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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i11.Future<Map<String, dynamic>>);
|
||||
|
||||
@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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i11.Future<Map<String, dynamic>>);
|
||||
|
||||
@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<void> setFilters(_i12.Filters? newFilters) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setFilters,
|
||||
[newFilters],
|
||||
),
|
||||
Invocation.method(#setFilters, [newFilters]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
void initFilters() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initFilters,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#initFilters, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i11.Future<void> findByFilters() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findByFilters,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#findByFilters, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@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<void> fetchAndSetCategoriesFromApi() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategoriesFromApi,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetCategoriesFromApi, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetMusclesFromApi() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetMusclesFromApi,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetMusclesFromApi, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetEquipmentsFromApi() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEquipmentsFromApi,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetEquipmentsFromApi, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetLanguagesFromApi() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLanguagesFromApi,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetLanguagesFromApi, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@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<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initCacheTimesLocalPrefs,
|
||||
[],
|
||||
{#forceInit: forceInit},
|
||||
),
|
||||
Invocation.method(#initCacheTimesLocalPrefs, [], {
|
||||
#forceInit: forceInit,
|
||||
}),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> clearAllCachesAndPrefs() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearAllCachesAndPrefs,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#clearAllCachesAndPrefs, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetInitialData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetInitialData,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetInitialData, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
@@ -667,50 +473,35 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
|
||||
@override
|
||||
_i11.Future<void> updateExerciseCache(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateExerciseCache,
|
||||
[database],
|
||||
),
|
||||
Invocation.method(#updateExerciseCache, [database]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetMuscles(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetMuscles,
|
||||
[database],
|
||||
),
|
||||
Invocation.method(#fetchAndSetMuscles, [database]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetCategories(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategories,
|
||||
[database],
|
||||
),
|
||||
Invocation.method(#fetchAndSetCategories, [database]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetLanguages(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLanguages,
|
||||
[database],
|
||||
),
|
||||
Invocation.method(#fetchAndSetLanguages, [database]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetEquipments(_i5.ExerciseDatabase? database) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEquipments,
|
||||
[database],
|
||||
),
|
||||
Invocation.method(#fetchAndSetEquipments, [database]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
@@ -718,54 +509,41 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
@override
|
||||
_i11.Future<List<_i6.Exercise>> 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<List<_i6.Exercise>>.value(
|
||||
<_i6.Exercise>[],
|
||||
),
|
||||
returnValue: _i11.Future<List<_i6.Exercise>>.value(<_i6.Exercise>[]),
|
||||
) as _i11.Future<List<_i6.Exercise>>);
|
||||
|
||||
@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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<void> fetchAndSetAllPlansFull() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansFull,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansFull, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansSparse, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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<void> editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editWorkout,
|
||||
[workout],
|
||||
),
|
||||
Invocation.method(#editWorkout, [workout]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteWorkout(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWorkout,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#deleteWorkout, [id]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@@ -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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i12.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRepetitionUnits,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWeightUnits,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetUnits,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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<void> editDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDay,
|
||||
[day],
|
||||
),
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteDay,
|
||||
[day],
|
||||
),
|
||||
Invocation.method(#deleteDay, [day]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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<void> editSet(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSet,
|
||||
[workoutSet],
|
||||
),
|
||||
Invocation.method(#editSet, [workoutSet]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@@ -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<List<_i7.Set>>.value(<_i7.Set>[]),
|
||||
) as _i12.Future<List<_i7.Set>>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchComputedSettings,
|
||||
[workoutSet],
|
||||
),
|
||||
Invocation.method(#fetchComputedSettings, [workoutSet]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@@ -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<String>.value(_i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchSmartText,
|
||||
[
|
||||
workoutSet,
|
||||
exercise,
|
||||
],
|
||||
Invocation.method(#fetchSmartText, [workoutSet, exercise]),
|
||||
returnValue: _i12.Future<String>.value(
|
||||
_i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#fetchSmartText, [workoutSet, exercise]),
|
||||
),
|
||||
)),
|
||||
),
|
||||
) as _i12.Future<String>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteSet(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteSet,
|
||||
[workoutSet],
|
||||
),
|
||||
Invocation.method(#deleteSet, [workoutSet]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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<dynamic> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i12.Future<dynamic>.value(),
|
||||
) as _i12.Future<dynamic>);
|
||||
|
||||
@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<void> deleteLog(_i10.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[log],
|
||||
),
|
||||
Invocation.method(#deleteLog, [log]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<List<_i3.WeightEntry>> fetchAndSetEntries() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEntries,
|
||||
[],
|
||||
Invocation.method(#fetchAndSetEntries, []),
|
||||
returnValue: _i5.Future<List<_i3.WeightEntry>>.value(
|
||||
<_i3.WeightEntry>[],
|
||||
),
|
||||
returnValue: _i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
) as _i5.Future<List<_i3.WeightEntry>>);
|
||||
|
||||
@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<void> editEntry(_i3.WeightEntry? entry) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editEntry,
|
||||
[entry],
|
||||
),
|
||||
Invocation.method(#editEntry, [entry]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteEntry(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteEntry,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#deleteEntry, [id]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<void> fetchAndSetAllPlansFull() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansFull,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansFull, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansSparse, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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<void> editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editWorkout,
|
||||
[workout],
|
||||
),
|
||||
Invocation.method(#editWorkout, [workout]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteWorkout(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWorkout,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#deleteWorkout, [id]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@@ -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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i12.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRepetitionUnits,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWeightUnits,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetUnits,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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<void> editDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDay,
|
||||
[day],
|
||||
),
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteDay,
|
||||
[day],
|
||||
),
|
||||
Invocation.method(#deleteDay, [day]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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<void> editSet(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSet,
|
||||
[workoutSet],
|
||||
),
|
||||
Invocation.method(#editSet, [workoutSet]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@@ -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<List<_i7.Set>>.value(<_i7.Set>[]),
|
||||
) as _i12.Future<List<_i7.Set>>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchComputedSettings,
|
||||
[workoutSet],
|
||||
),
|
||||
Invocation.method(#fetchComputedSettings, [workoutSet]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@@ -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<String>.value(_i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchSmartText,
|
||||
[
|
||||
workoutSet,
|
||||
exercise,
|
||||
],
|
||||
Invocation.method(#fetchSmartText, [workoutSet, exercise]),
|
||||
returnValue: _i12.Future<String>.value(
|
||||
_i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#fetchSmartText, [workoutSet, exercise]),
|
||||
),
|
||||
)),
|
||||
),
|
||||
) as _i12.Future<String>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteSet(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteSet,
|
||||
[workoutSet],
|
||||
),
|
||||
Invocation.method(#deleteSet, [workoutSet]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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<dynamic> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i12.Future<dynamic>.value(),
|
||||
) as _i12.Future<dynamic>);
|
||||
|
||||
@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<void> deleteLog(_i10.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[log],
|
||||
),
|
||||
Invocation.method(#deleteLog, [log]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<void> fetchAndSetAllPlansFull() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansFull,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansFull, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansSparse, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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<void> editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editWorkout,
|
||||
[workout],
|
||||
),
|
||||
Invocation.method(#editWorkout, [workout]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteWorkout(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWorkout,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#deleteWorkout, [id]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@@ -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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i12.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetRepetitionUnits,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWeightUnits,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetUnits,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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<void> editDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editDay,
|
||||
[day],
|
||||
),
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteDay(_i6.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteDay,
|
||||
[day],
|
||||
),
|
||||
Invocation.method(#deleteDay, [day]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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<void> editSet(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editSet,
|
||||
[workoutSet],
|
||||
),
|
||||
Invocation.method(#editSet, [workoutSet]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@@ -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<List<_i7.Set>>.value(<_i7.Set>[]),
|
||||
) as _i12.Future<List<_i7.Set>>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchComputedSettings,
|
||||
[workoutSet],
|
||||
),
|
||||
Invocation.method(#fetchComputedSettings, [workoutSet]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@@ -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<String>.value(_i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchSmartText,
|
||||
[
|
||||
workoutSet,
|
||||
exercise,
|
||||
],
|
||||
Invocation.method(#fetchSmartText, [workoutSet, exercise]),
|
||||
returnValue: _i12.Future<String>.value(
|
||||
_i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#fetchSmartText, [workoutSet, exercise]),
|
||||
),
|
||||
)),
|
||||
),
|
||||
) as _i12.Future<String>);
|
||||
|
||||
@override
|
||||
_i12.Future<void> deleteSet(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteSet,
|
||||
[workoutSet],
|
||||
),
|
||||
Invocation.method(#deleteSet, [workoutSet]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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<dynamic> fetchSessionData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchSessionData,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i12.Future<dynamic>.value(),
|
||||
) as _i12.Future<dynamic>);
|
||||
|
||||
@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<void> deleteLog(_i10.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[log],
|
||||
),
|
||||
Invocation.method(#deleteLog, [log]),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
|
||||
@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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
) as Map<String, String>);
|
||||
|
||||
@@ -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<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@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>);
|
||||
}
|
||||
|
||||
@@ -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<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
) as Map<String, String>);
|
||||
|
||||
@@ -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<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@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>);
|
||||
}
|
||||
|
||||
@@ -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<String, String> getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
) as Map<String, String>);
|
||||
|
||||
@@ -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<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
@@ -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<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@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>);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user