feat: recipe like

This commit is contained in:
BLoC
2025-01-24 14:34:55 +03:00
parent 394e6d8bbf
commit ae7c72cd53
19 changed files with 1117 additions and 1504 deletions

View File

@@ -1,4 +1,4 @@
// Mocks generated by Mockito 5.4.4 from annotations
// Mocks generated by Mockito 5.4.5 from annotations
// in eatvio_app/test/features/profile/services/profile_service_test.dart.
// Do not manually edit this file.
@@ -27,52 +27,33 @@ import 'package:mockito/mockito.dart' as _i1;
// 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 _FakeProfileModel_0 extends _i1.SmartFake implements _i2.ProfileModel {
_FakeProfileModel_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
_FakeProfileModel_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeProfileDetailsModel_1 extends _i1.SmartFake
implements _i2.ProfileDetailsModel {
_FakeProfileDetailsModel_1(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
_FakeProfileDetailsModel_1(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeSubPaginationModel_2 extends _i1.SmartFake
implements _i3.SubPaginationModel {
_FakeSubPaginationModel_2(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
_FakeSubPaginationModel_2(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
class _FakeChosenDietsPaginationModel_3 extends _i1.SmartFake
implements _i4.ChosenDietsPaginationModel {
_FakeChosenDietsPaginationModel_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
_FakeChosenDietsPaginationModel_3(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
/// A class which mocks [ProfileService].
@@ -82,106 +63,78 @@ class MockProfileService extends _i1.Mock implements _i5.ProfileService {
@override
_i6.Future<_i2.ProfileModel> getProfileBySlug({required String? slug}) =>
(super.noSuchMethod(
Invocation.method(
#getProfileBySlug,
[],
{#slug: slug},
),
returnValue: _i6.Future<_i2.ProfileModel>.value(_FakeProfileModel_0(
this,
Invocation.method(
#getProfileBySlug,
[],
{#slug: slug},
),
)),
returnValueForMissingStub:
_i6.Future<_i2.ProfileModel>.value(_FakeProfileModel_0(
this,
Invocation.method(
#getProfileBySlug,
[],
{#slug: slug},
),
)),
) as _i6.Future<_i2.ProfileModel>);
Invocation.method(#getProfileBySlug, [], {#slug: slug}),
returnValue: _i6.Future<_i2.ProfileModel>.value(
_FakeProfileModel_0(
this,
Invocation.method(#getProfileBySlug, [], {#slug: slug}),
),
),
returnValueForMissingStub: _i6.Future<_i2.ProfileModel>.value(
_FakeProfileModel_0(
this,
Invocation.method(#getProfileBySlug, [], {#slug: slug}),
),
),
)
as _i6.Future<_i2.ProfileModel>);
@override
_i6.Future<_i2.ProfileModel> getMyProfile() => (super.noSuchMethod(
Invocation.method(
#getMyProfile,
[],
),
returnValue: _i6.Future<_i2.ProfileModel>.value(_FakeProfileModel_0(
this,
Invocation.method(
#getMyProfile,
[],
),
)),
returnValueForMissingStub:
_i6.Future<_i2.ProfileModel>.value(_FakeProfileModel_0(
this,
Invocation.method(
#getMyProfile,
[],
),
)),
) as _i6.Future<_i2.ProfileModel>);
_i6.Future<_i2.ProfileModel> getMyProfile() =>
(super.noSuchMethod(
Invocation.method(#getMyProfile, []),
returnValue: _i6.Future<_i2.ProfileModel>.value(
_FakeProfileModel_0(this, Invocation.method(#getMyProfile, [])),
),
returnValueForMissingStub: _i6.Future<_i2.ProfileModel>.value(
_FakeProfileModel_0(this, Invocation.method(#getMyProfile, [])),
),
)
as _i6.Future<_i2.ProfileModel>);
@override
_i6.Future<_i2.ProfileDetailsModel> getMyProfileDetails() =>
(super.noSuchMethod(
Invocation.method(
#getMyProfileDetails,
[],
),
returnValue: _i6.Future<_i2.ProfileDetailsModel>.value(
_FakeProfileDetailsModel_1(
this,
Invocation.method(
#getMyProfileDetails,
[],
),
)),
returnValueForMissingStub: _i6.Future<_i2.ProfileDetailsModel>.value(
_FakeProfileDetailsModel_1(
this,
Invocation.method(
#getMyProfileDetails,
[],
),
)),
) as _i6.Future<_i2.ProfileDetailsModel>);
Invocation.method(#getMyProfileDetails, []),
returnValue: _i6.Future<_i2.ProfileDetailsModel>.value(
_FakeProfileDetailsModel_1(
this,
Invocation.method(#getMyProfileDetails, []),
),
),
returnValueForMissingStub:
_i6.Future<_i2.ProfileDetailsModel>.value(
_FakeProfileDetailsModel_1(
this,
Invocation.method(#getMyProfileDetails, []),
),
),
)
as _i6.Future<_i2.ProfileDetailsModel>);
@override
_i6.Future<_i2.ProfileDetailsModel> getProfileDetailsBySlug(
{required String? slug}) =>
_i6.Future<_i2.ProfileDetailsModel> getProfileDetailsBySlug({
required String? slug,
}) =>
(super.noSuchMethod(
Invocation.method(
#getProfileDetailsBySlug,
[],
{#slug: slug},
),
returnValue: _i6.Future<_i2.ProfileDetailsModel>.value(
_FakeProfileDetailsModel_1(
this,
Invocation.method(
#getProfileDetailsBySlug,
[],
{#slug: slug},
),
)),
returnValueForMissingStub: _i6.Future<_i2.ProfileDetailsModel>.value(
_FakeProfileDetailsModel_1(
this,
Invocation.method(
#getProfileDetailsBySlug,
[],
{#slug: slug},
),
)),
) as _i6.Future<_i2.ProfileDetailsModel>);
Invocation.method(#getProfileDetailsBySlug, [], {#slug: slug}),
returnValue: _i6.Future<_i2.ProfileDetailsModel>.value(
_FakeProfileDetailsModel_1(
this,
Invocation.method(#getProfileDetailsBySlug, [], {#slug: slug}),
),
),
returnValueForMissingStub:
_i6.Future<_i2.ProfileDetailsModel>.value(
_FakeProfileDetailsModel_1(
this,
Invocation.method(#getProfileDetailsBySlug, [], {
#slug: slug,
}),
),
),
)
as _i6.Future<_i2.ProfileDetailsModel>);
@override
_i6.Future<void> addCircumference({
@@ -190,59 +143,53 @@ class MockProfileService extends _i1.Mock implements _i5.ProfileService {
required int? hipCircumference,
}) =>
(super.noSuchMethod(
Invocation.method(
#addCircumference,
[],
{
#chestCircumference: chestCircumference,
#waistCircumference: waistCircumference,
#hipCircumference: hipCircumference,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
Invocation.method(#addCircumference, [], {
#chestCircumference: chestCircumference,
#waistCircumference: waistCircumference,
#hipCircumference: hipCircumference,
}),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
)
as _i6.Future<void>);
@override
_i6.Future<void> addWeight({required double? weight}) => (super.noSuchMethod(
Invocation.method(
#addWeight,
[],
{#weight: weight},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<List<_i7.FeedBlogPostModel>> getBlogPostByAuthorSlug(
{required String? slug}) =>
_i6.Future<void> addWeight({required double? weight}) =>
(super.noSuchMethod(
Invocation.method(
#getBlogPostByAuthorSlug,
[],
{#slug: slug},
),
returnValue: _i6.Future<List<_i7.FeedBlogPostModel>>.value(
<_i7.FeedBlogPostModel>[]),
returnValueForMissingStub:
_i6.Future<List<_i7.FeedBlogPostModel>>.value(
<_i7.FeedBlogPostModel>[]),
) as _i6.Future<List<_i7.FeedBlogPostModel>>);
Invocation.method(#addWeight, [], {#weight: weight}),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
)
as _i6.Future<void>);
@override
_i6.Future<List<_i7.FeedBlogPostModel>> getBlogPostByAuthorSlug({
required String? slug,
}) =>
(super.noSuchMethod(
Invocation.method(#getBlogPostByAuthorSlug, [], {#slug: slug}),
returnValue: _i6.Future<List<_i7.FeedBlogPostModel>>.value(
<_i7.FeedBlogPostModel>[],
),
returnValueForMissingStub:
_i6.Future<List<_i7.FeedBlogPostModel>>.value(
<_i7.FeedBlogPostModel>[],
),
)
as _i6.Future<List<_i7.FeedBlogPostModel>>);
@override
_i6.Future<List<_i8.WeightModel>> getWeight({required String? period}) =>
(super.noSuchMethod(
Invocation.method(
#getWeight,
[],
{#period: period},
),
returnValue:
_i6.Future<List<_i8.WeightModel>>.value(<_i8.WeightModel>[]),
returnValueForMissingStub:
_i6.Future<List<_i8.WeightModel>>.value(<_i8.WeightModel>[]),
) as _i6.Future<List<_i8.WeightModel>>);
Invocation.method(#getWeight, [], {#period: period}),
returnValue: _i6.Future<List<_i8.WeightModel>>.value(
<_i8.WeightModel>[],
),
returnValueForMissingStub: _i6.Future<List<_i8.WeightModel>>.value(
<_i8.WeightModel>[],
),
)
as _i6.Future<List<_i8.WeightModel>>);
@override
_i6.Future<List<_i8.WeightModel>> getWeightBySlug({
@@ -250,35 +197,34 @@ class MockProfileService extends _i1.Mock implements _i5.ProfileService {
required String? slug,
}) =>
(super.noSuchMethod(
Invocation.method(
#getWeightBySlug,
[],
{
#period: period,
#slug: slug,
},
),
returnValue:
_i6.Future<List<_i8.WeightModel>>.value(<_i8.WeightModel>[]),
returnValueForMissingStub:
_i6.Future<List<_i8.WeightModel>>.value(<_i8.WeightModel>[]),
) as _i6.Future<List<_i8.WeightModel>>);
Invocation.method(#getWeightBySlug, [], {
#period: period,
#slug: slug,
}),
returnValue: _i6.Future<List<_i8.WeightModel>>.value(
<_i8.WeightModel>[],
),
returnValueForMissingStub: _i6.Future<List<_i8.WeightModel>>.value(
<_i8.WeightModel>[],
),
)
as _i6.Future<List<_i8.WeightModel>>);
@override
_i6.Future<List<_i9.CircumferenceModel>> getCircumferences(
{required String? period}) =>
_i6.Future<List<_i9.CircumferenceModel>> getCircumferences({
required String? period,
}) =>
(super.noSuchMethod(
Invocation.method(
#getCircumferences,
[],
{#period: period},
),
returnValue: _i6.Future<List<_i9.CircumferenceModel>>.value(
<_i9.CircumferenceModel>[]),
returnValueForMissingStub:
_i6.Future<List<_i9.CircumferenceModel>>.value(
<_i9.CircumferenceModel>[]),
) as _i6.Future<List<_i9.CircumferenceModel>>);
Invocation.method(#getCircumferences, [], {#period: period}),
returnValue: _i6.Future<List<_i9.CircumferenceModel>>.value(
<_i9.CircumferenceModel>[],
),
returnValueForMissingStub:
_i6.Future<List<_i9.CircumferenceModel>>.value(
<_i9.CircumferenceModel>[],
),
)
as _i6.Future<List<_i9.CircumferenceModel>>);
@override
_i6.Future<List<_i9.CircumferenceModel>> getCircumferencesBySlug({
@@ -286,20 +232,19 @@ class MockProfileService extends _i1.Mock implements _i5.ProfileService {
required String? slug,
}) =>
(super.noSuchMethod(
Invocation.method(
#getCircumferencesBySlug,
[],
{
#period: period,
#slug: slug,
},
),
returnValue: _i6.Future<List<_i9.CircumferenceModel>>.value(
<_i9.CircumferenceModel>[]),
returnValueForMissingStub:
_i6.Future<List<_i9.CircumferenceModel>>.value(
<_i9.CircumferenceModel>[]),
) as _i6.Future<List<_i9.CircumferenceModel>>);
Invocation.method(#getCircumferencesBySlug, [], {
#period: period,
#slug: slug,
}),
returnValue: _i6.Future<List<_i9.CircumferenceModel>>.value(
<_i9.CircumferenceModel>[],
),
returnValueForMissingStub:
_i6.Future<List<_i9.CircumferenceModel>>.value(
<_i9.CircumferenceModel>[],
),
)
as _i6.Future<List<_i9.CircumferenceModel>>);
@override
_i6.Future<_i3.SubPaginationModel> getSubscribers({
@@ -307,39 +252,30 @@ class MockProfileService extends _i1.Mock implements _i5.ProfileService {
String? query,
}) =>
(super.noSuchMethod(
Invocation.method(
#getSubscribers,
[],
{
#slug: slug,
#query: query,
},
),
returnValue:
_i6.Future<_i3.SubPaginationModel>.value(_FakeSubPaginationModel_2(
this,
Invocation.method(
#getSubscribers,
[],
{
Invocation.method(#getSubscribers, [], {
#slug: slug,
#query: query,
},
),
)),
returnValueForMissingStub:
_i6.Future<_i3.SubPaginationModel>.value(_FakeSubPaginationModel_2(
this,
Invocation.method(
#getSubscribers,
[],
{
#slug: slug,
#query: query,
},
),
)),
) as _i6.Future<_i3.SubPaginationModel>);
}),
returnValue: _i6.Future<_i3.SubPaginationModel>.value(
_FakeSubPaginationModel_2(
this,
Invocation.method(#getSubscribers, [], {
#slug: slug,
#query: query,
}),
),
),
returnValueForMissingStub: _i6.Future<_i3.SubPaginationModel>.value(
_FakeSubPaginationModel_2(
this,
Invocation.method(#getSubscribers, [], {
#slug: slug,
#query: query,
}),
),
),
)
as _i6.Future<_i3.SubPaginationModel>);
@override
_i6.Future<_i3.SubPaginationModel> getSubscriptions({
@@ -347,107 +283,84 @@ class MockProfileService extends _i1.Mock implements _i5.ProfileService {
String? query,
}) =>
(super.noSuchMethod(
Invocation.method(
#getSubscriptions,
[],
{
#slug: slug,
#query: query,
},
),
returnValue:
_i6.Future<_i3.SubPaginationModel>.value(_FakeSubPaginationModel_2(
this,
Invocation.method(
#getSubscriptions,
[],
{
Invocation.method(#getSubscriptions, [], {
#slug: slug,
#query: query,
},
),
)),
returnValueForMissingStub:
_i6.Future<_i3.SubPaginationModel>.value(_FakeSubPaginationModel_2(
this,
Invocation.method(
#getSubscriptions,
[],
{
#slug: slug,
#query: query,
},
),
)),
) as _i6.Future<_i3.SubPaginationModel>);
}),
returnValue: _i6.Future<_i3.SubPaginationModel>.value(
_FakeSubPaginationModel_2(
this,
Invocation.method(#getSubscriptions, [], {
#slug: slug,
#query: query,
}),
),
),
returnValueForMissingStub: _i6.Future<_i3.SubPaginationModel>.value(
_FakeSubPaginationModel_2(
this,
Invocation.method(#getSubscriptions, [], {
#slug: slug,
#query: query,
}),
),
),
)
as _i6.Future<_i3.SubPaginationModel>);
@override
_i6.Future<void> subscribe({required String? slug}) => (super.noSuchMethod(
Invocation.method(
#subscribe,
[],
{#slug: slug},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
_i6.Future<void> subscribe({required String? slug}) =>
(super.noSuchMethod(
Invocation.method(#subscribe, [], {#slug: slug}),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
)
as _i6.Future<void>);
@override
_i6.Future<void> unsubscribe({required String? slug}) => (super.noSuchMethod(
Invocation.method(
#unsubscribe,
[],
{#slug: slug},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
_i6.Future<void> unsubscribe({required String? slug}) =>
(super.noSuchMethod(
Invocation.method(#unsubscribe, [], {#slug: slug}),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
)
as _i6.Future<void>);
@override
_i6.Future<void> uploadPhoto({required _i10.File? photo}) =>
(super.noSuchMethod(
Invocation.method(
#uploadPhoto,
[],
{#photo: photo},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
Invocation.method(#uploadPhoto, [], {#photo: photo}),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
)
as _i6.Future<void>);
@override
_i6.Future<void> deletePhoto() => (super.noSuchMethod(
Invocation.method(
#deletePhoto,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
_i6.Future<void> deletePhoto() =>
(super.noSuchMethod(
Invocation.method(#deletePhoto, []),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
)
as _i6.Future<void>);
@override
_i6.Future<_i4.ChosenDietsPaginationModel> getChosenDiets() =>
(super.noSuchMethod(
Invocation.method(
#getChosenDiets,
[],
),
returnValue: _i6.Future<_i4.ChosenDietsPaginationModel>.value(
_FakeChosenDietsPaginationModel_3(
this,
Invocation.method(
#getChosenDiets,
[],
),
)),
returnValueForMissingStub:
_i6.Future<_i4.ChosenDietsPaginationModel>.value(
_FakeChosenDietsPaginationModel_3(
this,
Invocation.method(
#getChosenDiets,
[],
),
)),
) as _i6.Future<_i4.ChosenDietsPaginationModel>);
Invocation.method(#getChosenDiets, []),
returnValue: _i6.Future<_i4.ChosenDietsPaginationModel>.value(
_FakeChosenDietsPaginationModel_3(
this,
Invocation.method(#getChosenDiets, []),
),
),
returnValueForMissingStub:
_i6.Future<_i4.ChosenDietsPaginationModel>.value(
_FakeChosenDietsPaginationModel_3(
this,
Invocation.method(#getChosenDiets, []),
),
),
)
as _i6.Future<_i4.ChosenDietsPaginationModel>);
}