mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Now the images are kept in a single list, instead of having two for the files themselves and the metadata.
384 lines
13 KiB
Dart
384 lines
13 KiB
Dart
// Mocks generated by Mockito 5.4.6 from annotations
|
|
// in wger/test/exercises/contribute_exercise_image_test.dart.
|
|
// Do not manually edit this file.
|
|
|
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
|
import 'dart:async' as _i14;
|
|
import 'dart:ui' as _i15;
|
|
|
|
import 'package:http/http.dart' as _i5;
|
|
import 'package:mockito/mockito.dart' as _i1;
|
|
import 'package:mockito/src/dummies.dart' as _i11;
|
|
import 'package:wger/models/exercises/category.dart' as _i13;
|
|
import 'package:wger/models/exercises/equipment.dart' as _i8;
|
|
import 'package:wger/models/exercises/exercise_submission.dart' as _i10;
|
|
import 'package:wger/models/exercises/exercise_submission_images.dart' as _i7;
|
|
import 'package:wger/models/exercises/language.dart' as _i12;
|
|
import 'package:wger/models/exercises/muscle.dart' as _i9;
|
|
import 'package:wger/models/exercises/variation.dart' as _i3;
|
|
import 'package:wger/providers/add_exercise.dart' as _i6;
|
|
import 'package:wger/providers/auth.dart' as _i4;
|
|
import 'package:wger/providers/base_provider.dart' as _i2;
|
|
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: avoid_redundant_argument_values
|
|
// ignore_for_file: avoid_setters_without_getters
|
|
// ignore_for_file: comment_references
|
|
// ignore_for_file: deprecated_member_use
|
|
// ignore_for_file: deprecated_member_use_from_same_package
|
|
// ignore_for_file: implementation_imports
|
|
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
|
// ignore_for_file: 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
|
|
// ignore_for_file: invalid_use_of_internal_member
|
|
|
|
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
|
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
|
|
: super(parent, parentInvocation);
|
|
}
|
|
|
|
class _FakeVariation_1 extends _i1.SmartFake implements _i3.Variation {
|
|
_FakeVariation_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
|
}
|
|
|
|
class _FakeAuthProvider_2 extends _i1.SmartFake implements _i4.AuthProvider {
|
|
_FakeAuthProvider_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
|
}
|
|
|
|
class _FakeClient_3 extends _i1.SmartFake implements _i5.Client {
|
|
_FakeClient_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
|
}
|
|
|
|
class _FakeUri_4 extends _i1.SmartFake implements Uri {
|
|
_FakeUri_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
|
}
|
|
|
|
class _FakeResponse_5 extends _i1.SmartFake implements _i5.Response {
|
|
_FakeResponse_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 _i6.AddExerciseProvider {
|
|
MockAddExerciseProvider() {
|
|
_i1.throwOnMissingStub(this);
|
|
}
|
|
|
|
@override
|
|
_i2.WgerBaseProvider get baseProvider =>
|
|
(super.noSuchMethod(
|
|
Invocation.getter(#baseProvider),
|
|
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
|
)
|
|
as _i2.WgerBaseProvider);
|
|
|
|
@override
|
|
List<_i7.ExerciseSubmissionImage> get exerciseImages =>
|
|
(super.noSuchMethod(
|
|
Invocation.getter(#exerciseImages),
|
|
returnValue: <_i7.ExerciseSubmissionImage>[],
|
|
)
|
|
as List<_i7.ExerciseSubmissionImage>);
|
|
|
|
@override
|
|
List<String> get alternateNamesEn =>
|
|
(super.noSuchMethod(Invocation.getter(#alternateNamesEn), returnValue: <String>[])
|
|
as List<String>);
|
|
|
|
@override
|
|
List<String> get alternateNamesTrans =>
|
|
(super.noSuchMethod(Invocation.getter(#alternateNamesTrans), returnValue: <String>[])
|
|
as List<String>);
|
|
|
|
@override
|
|
List<_i8.Equipment> get equipment =>
|
|
(super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i8.Equipment>[])
|
|
as List<_i8.Equipment>);
|
|
|
|
@override
|
|
bool get newVariation =>
|
|
(super.noSuchMethod(Invocation.getter(#newVariation), returnValue: false) as bool);
|
|
|
|
@override
|
|
_i3.Variation get variation =>
|
|
(super.noSuchMethod(
|
|
Invocation.getter(#variation),
|
|
returnValue: _FakeVariation_1(this, Invocation.getter(#variation)),
|
|
)
|
|
as _i3.Variation);
|
|
|
|
@override
|
|
List<_i9.Muscle> get primaryMuscles =>
|
|
(super.noSuchMethod(Invocation.getter(#primaryMuscles), returnValue: <_i9.Muscle>[])
|
|
as List<_i9.Muscle>);
|
|
|
|
@override
|
|
List<_i9.Muscle> get secondaryMuscles =>
|
|
(super.noSuchMethod(Invocation.getter(#secondaryMuscles), returnValue: <_i9.Muscle>[])
|
|
as List<_i9.Muscle>);
|
|
|
|
@override
|
|
_i10.ExerciseSubmissionApi get exerciseApiObject =>
|
|
(super.noSuchMethod(
|
|
Invocation.getter(#exerciseApiObject),
|
|
returnValue: _i11.dummyValue<_i10.ExerciseSubmissionApi>(
|
|
this,
|
|
Invocation.getter(#exerciseApiObject),
|
|
),
|
|
)
|
|
as _i10.ExerciseSubmissionApi);
|
|
|
|
@override
|
|
set exerciseNameEn(String? value) => super.noSuchMethod(
|
|
Invocation.setter(#exerciseNameEn, value),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
set exerciseNameTrans(String? value) => super.noSuchMethod(
|
|
Invocation.setter(#exerciseNameTrans, value),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
set descriptionEn(String? value) =>
|
|
super.noSuchMethod(Invocation.setter(#descriptionEn, value), returnValueForMissingStub: null);
|
|
|
|
@override
|
|
set descriptionTrans(String? value) => super.noSuchMethod(
|
|
Invocation.setter(#descriptionTrans, value),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
set languageEn(_i12.Language? value) =>
|
|
super.noSuchMethod(Invocation.setter(#languageEn, value), returnValueForMissingStub: null);
|
|
|
|
@override
|
|
set languageTranslation(_i12.Language? value) => super.noSuchMethod(
|
|
Invocation.setter(#languageTranslation, value),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
set alternateNamesEn(List<String>? value) => super.noSuchMethod(
|
|
Invocation.setter(#alternateNamesEn, value),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
set alternateNamesTrans(List<String>? value) => super.noSuchMethod(
|
|
Invocation.setter(#alternateNamesTrans, value),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
set category(_i13.ExerciseCategory? value) =>
|
|
super.noSuchMethod(Invocation.setter(#category, value), returnValueForMissingStub: null);
|
|
|
|
@override
|
|
set equipment(List<_i8.Equipment>? equipment) =>
|
|
super.noSuchMethod(Invocation.setter(#equipment, equipment), returnValueForMissingStub: null);
|
|
|
|
@override
|
|
set variationConnectToExercise(int? value) => super.noSuchMethod(
|
|
Invocation.setter(#variationConnectToExercise, value),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
set variationId(int? variation) => super.noSuchMethod(
|
|
Invocation.setter(#variationId, variation),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
set primaryMuscles(List<_i9.Muscle>? muscles) => super.noSuchMethod(
|
|
Invocation.setter(#primaryMuscles, muscles),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
set secondaryMuscles(List<_i9.Muscle>? muscles) => super.noSuchMethod(
|
|
Invocation.setter(#secondaryMuscles, muscles),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
bool get hasListeners =>
|
|
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
|
|
|
@override
|
|
void clear() =>
|
|
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
|
|
|
@override
|
|
void addExerciseImages(List<_i7.ExerciseSubmissionImage>? images) => super.noSuchMethod(
|
|
Invocation.method(#addExerciseImages, [images]),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
void removeImage(String? path) =>
|
|
super.noSuchMethod(Invocation.method(#removeImage, [path]), returnValueForMissingStub: null);
|
|
|
|
@override
|
|
_i14.Future<int> postExerciseToServer() =>
|
|
(super.noSuchMethod(
|
|
Invocation.method(#postExerciseToServer, []),
|
|
returnValue: _i14.Future<int>.value(0),
|
|
)
|
|
as _i14.Future<int>);
|
|
|
|
@override
|
|
_i14.Future<int> addExerciseSubmission() =>
|
|
(super.noSuchMethod(
|
|
Invocation.method(#addExerciseSubmission, []),
|
|
returnValue: _i14.Future<int>.value(0),
|
|
)
|
|
as _i14.Future<int>);
|
|
|
|
@override
|
|
_i14.Future<void> addImages(int? exerciseId) =>
|
|
(super.noSuchMethod(
|
|
Invocation.method(#addImages, [exerciseId]),
|
|
returnValue: _i14.Future<void>.value(),
|
|
returnValueForMissingStub: _i14.Future<void>.value(),
|
|
)
|
|
as _i14.Future<void>);
|
|
|
|
@override
|
|
_i14.Future<bool> validateLanguage(String? input, String? languageCode) =>
|
|
(super.noSuchMethod(
|
|
Invocation.method(#validateLanguage, [input, languageCode]),
|
|
returnValue: _i14.Future<bool>.value(false),
|
|
)
|
|
as _i14.Future<bool>);
|
|
|
|
@override
|
|
void addListener(_i15.VoidCallback? listener) => super.noSuchMethod(
|
|
Invocation.method(#addListener, [listener]),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod(
|
|
Invocation.method(#removeListener, [listener]),
|
|
returnValueForMissingStub: null,
|
|
);
|
|
|
|
@override
|
|
void dispose() =>
|
|
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
|
|
|
@override
|
|
void notifyListeners() =>
|
|
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
|
}
|
|
|
|
/// A class which mocks [WgerBaseProvider].
|
|
///
|
|
/// See the documentation for Mockito's code generation for more information.
|
|
class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
|
MockWgerBaseProvider() {
|
|
_i1.throwOnMissingStub(this);
|
|
}
|
|
|
|
@override
|
|
_i4.AuthProvider get auth =>
|
|
(super.noSuchMethod(
|
|
Invocation.getter(#auth),
|
|
returnValue: _FakeAuthProvider_2(this, Invocation.getter(#auth)),
|
|
)
|
|
as _i4.AuthProvider);
|
|
|
|
@override
|
|
_i5.Client get client =>
|
|
(super.noSuchMethod(
|
|
Invocation.getter(#client),
|
|
returnValue: _FakeClient_3(this, Invocation.getter(#client)),
|
|
)
|
|
as _i5.Client);
|
|
|
|
@override
|
|
set auth(_i4.AuthProvider? value) =>
|
|
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
|
|
|
|
@override
|
|
set client(_i5.Client? value) =>
|
|
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
|
|
|
@override
|
|
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
|
(super.noSuchMethod(
|
|
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
|
|
returnValue: <String, String>{},
|
|
)
|
|
as Map<String, String>);
|
|
|
|
@override
|
|
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
|
(super.noSuchMethod(
|
|
Invocation.method(
|
|
#makeUrl,
|
|
[path],
|
|
{#id: id, #objectMethod: objectMethod, #query: query},
|
|
),
|
|
returnValue: _FakeUri_4(
|
|
this,
|
|
Invocation.method(
|
|
#makeUrl,
|
|
[path],
|
|
{#id: id, #objectMethod: objectMethod, #query: query},
|
|
),
|
|
),
|
|
)
|
|
as Uri);
|
|
|
|
@override
|
|
_i14.Future<dynamic> fetch(Uri? uri) =>
|
|
(super.noSuchMethod(
|
|
Invocation.method(#fetch, [uri]),
|
|
returnValue: _i14.Future<dynamic>.value(),
|
|
)
|
|
as _i14.Future<dynamic>);
|
|
|
|
@override
|
|
_i14.Future<List<dynamic>> fetchPaginated(Uri? uri) =>
|
|
(super.noSuchMethod(
|
|
Invocation.method(#fetchPaginated, [uri]),
|
|
returnValue: _i14.Future<List<dynamic>>.value(<dynamic>[]),
|
|
)
|
|
as _i14.Future<List<dynamic>>);
|
|
|
|
@override
|
|
_i14.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
|
(super.noSuchMethod(
|
|
Invocation.method(#post, [data, uri]),
|
|
returnValue: _i14.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
|
)
|
|
as _i14.Future<Map<String, dynamic>>);
|
|
|
|
@override
|
|
_i14.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
|
(super.noSuchMethod(
|
|
Invocation.method(#patch, [data, uri]),
|
|
returnValue: _i14.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
|
)
|
|
as _i14.Future<Map<String, dynamic>>);
|
|
|
|
@override
|
|
_i14.Future<_i5.Response> deleteRequest(String? url, int? id) =>
|
|
(super.noSuchMethod(
|
|
Invocation.method(#deleteRequest, [url, id]),
|
|
returnValue: _i14.Future<_i5.Response>.value(
|
|
_FakeResponse_5(this, Invocation.method(#deleteRequest, [url, id])),
|
|
),
|
|
)
|
|
as _i14.Future<_i5.Response>);
|
|
}
|