Refactoring - Version stable
This commit is contained in:
@@ -9,189 +9,189 @@ void main() {
|
||||
group('required', () {
|
||||
test('should return error for null value', () {
|
||||
final validator = Validators.required();
|
||||
expect(validator!(''), equals('Ce champ est requis'));
|
||||
expect(validator(''), equals('Ce champ est requis'));
|
||||
});
|
||||
|
||||
test('should return error for empty string', () {
|
||||
final validator = Validators.required();
|
||||
expect(validator!(''), equals('Ce champ est requis'));
|
||||
expect(validator(''), equals('Ce champ est requis'));
|
||||
});
|
||||
|
||||
test('should return error for whitespace only', () {
|
||||
final validator = Validators.required();
|
||||
expect(validator!(' '), equals('Ce champ est requis'));
|
||||
expect(validator(' '), equals('Ce champ est requis'));
|
||||
});
|
||||
|
||||
test('should return null for valid value', () {
|
||||
final validator = Validators.required();
|
||||
expect(validator!('value'), isNull);
|
||||
expect(validator('value'), isNull);
|
||||
});
|
||||
|
||||
test('should use custom message', () {
|
||||
final validator = Validators.required(message: 'Custom error');
|
||||
expect(validator!(''), equals('Custom error'));
|
||||
expect(validator(''), equals('Custom error'));
|
||||
});
|
||||
});
|
||||
|
||||
group('minLength', () {
|
||||
test('should return error when value is too short', () {
|
||||
final validator = Validators.minLength(5);
|
||||
expect(validator!('abc'), equals('Minimum 5 caractères requis'));
|
||||
expect(validator('abc'), equals('Minimum 5 caractères requis'));
|
||||
});
|
||||
|
||||
test('should return null when value meets minimum', () {
|
||||
final validator = Validators.minLength(5);
|
||||
expect(validator!('abcde'), isNull);
|
||||
expect(validator('abcde'), isNull);
|
||||
});
|
||||
|
||||
test('should return null when value exceeds minimum', () {
|
||||
final validator = Validators.minLength(5);
|
||||
expect(validator!('abcdefgh'), isNull);
|
||||
expect(validator('abcdefgh'), isNull);
|
||||
});
|
||||
|
||||
test('should trim value before checking length', () {
|
||||
final validator = Validators.minLength(5);
|
||||
expect(validator!(' abc '), equals('Minimum 5 caractères requis'));
|
||||
expect(validator(' abc '), equals('Minimum 5 caractères requis'));
|
||||
});
|
||||
});
|
||||
|
||||
group('maxLength', () {
|
||||
test('should return error when value is too long', () {
|
||||
final validator = Validators.maxLength(5);
|
||||
expect(validator!('abcdefgh'), equals('Maximum 5 caractères autorisés'));
|
||||
expect(validator('abcdefgh'), equals('Maximum 5 caractères autorisés'));
|
||||
});
|
||||
|
||||
test('should return null when value meets maximum', () {
|
||||
final validator = Validators.maxLength(5);
|
||||
expect(validator!('abcde'), isNull);
|
||||
expect(validator('abcde'), isNull);
|
||||
});
|
||||
|
||||
test('should return null when value is under maximum', () {
|
||||
final validator = Validators.maxLength(5);
|
||||
expect(validator!('abc'), isNull);
|
||||
expect(validator('abc'), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
group('email', () {
|
||||
test('should return null for valid email', () {
|
||||
final validator = Validators.email();
|
||||
expect(validator!('test@example.com'), isNull);
|
||||
expect(validator!('user.name@domain.co.uk'), isNull);
|
||||
expect(validator!('user+tag@example.com'), isNull);
|
||||
expect(validator('test@example.com'), isNull);
|
||||
expect(validator('user.name@domain.co.uk'), isNull);
|
||||
expect(validator('user+tag@example.com'), isNull);
|
||||
});
|
||||
|
||||
test('should return error for invalid email', () {
|
||||
final validator = Validators.email();
|
||||
expect(validator!('invalid'), equals('Adresse email invalide'));
|
||||
expect(validator!('test@'), equals('Adresse email invalide'));
|
||||
expect(validator!('@example.com'), equals('Adresse email invalide'));
|
||||
expect(validator!('test @example.com'), equals('Adresse email invalide'));
|
||||
expect(validator('invalid'), equals('Adresse email invalide'));
|
||||
expect(validator('test@'), equals('Adresse email invalide'));
|
||||
expect(validator('@example.com'), equals('Adresse email invalide'));
|
||||
expect(validator('test @example.com'), equals('Adresse email invalide'));
|
||||
});
|
||||
|
||||
test('should return null for empty value (use required separately)', () {
|
||||
final validator = Validators.email();
|
||||
expect(validator!(''), isNull);
|
||||
expect(validator(''), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
group('numeric', () {
|
||||
test('should return null for valid numbers', () {
|
||||
final validator = Validators.numeric();
|
||||
expect(validator!('123'), isNull);
|
||||
expect(validator!('123.45'), isNull);
|
||||
expect(validator!('-123'), isNull);
|
||||
expect(validator!('0'), isNull);
|
||||
expect(validator('123'), isNull);
|
||||
expect(validator('123.45'), isNull);
|
||||
expect(validator('-123'), isNull);
|
||||
expect(validator('0'), isNull);
|
||||
});
|
||||
|
||||
test('should return error for non-numeric values', () {
|
||||
final validator = Validators.numeric();
|
||||
expect(validator!('abc'), equals('Veuillez entrer un nombre valide'));
|
||||
expect(validator!('12.34.56'), equals('Veuillez entrer un nombre valide'));
|
||||
expect(validator('abc'), equals('Veuillez entrer un nombre valide'));
|
||||
expect(validator('12.34.56'), equals('Veuillez entrer un nombre valide'));
|
||||
});
|
||||
|
||||
test('should return null for empty value', () {
|
||||
final validator = Validators.numeric();
|
||||
expect(validator!(''), isNull);
|
||||
expect(validator(''), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
group('minValue', () {
|
||||
test('should return error when value is below minimum', () {
|
||||
final validator = Validators.minValue(10);
|
||||
expect(validator!('5'), equals('La valeur doit être au moins 10.0'));
|
||||
expect(validator('5'), equals('La valeur doit être au moins 10.0'));
|
||||
});
|
||||
|
||||
test('should return null when value meets minimum', () {
|
||||
final validator = Validators.minValue(10);
|
||||
expect(validator!('10'), isNull);
|
||||
expect(validator('10'), isNull);
|
||||
});
|
||||
|
||||
test('should return null when value exceeds minimum', () {
|
||||
final validator = Validators.minValue(10);
|
||||
expect(validator!('15'), isNull);
|
||||
expect(validator('15'), isNull);
|
||||
});
|
||||
|
||||
test('should work with decimals', () {
|
||||
final validator = Validators.minValue(10.5);
|
||||
expect(validator!('10.4'), contains('au moins'));
|
||||
expect(validator!('10.5'), isNull);
|
||||
expect(validator!('10.6'), isNull);
|
||||
expect(validator('10.4'), contains('au moins'));
|
||||
expect(validator('10.5'), isNull);
|
||||
expect(validator('10.6'), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
group('maxValue', () {
|
||||
test('should return error when value exceeds maximum', () {
|
||||
final validator = Validators.maxValue(100);
|
||||
expect(validator!('150'), equals('La valeur doit être au maximum 100.0'));
|
||||
expect(validator('150'), equals('La valeur doit être au maximum 100.0'));
|
||||
});
|
||||
|
||||
test('should return null when value meets maximum', () {
|
||||
final validator = Validators.maxValue(100);
|
||||
expect(validator!('100'), isNull);
|
||||
expect(validator('100'), isNull);
|
||||
});
|
||||
|
||||
test('should return null when value is below maximum', () {
|
||||
final validator = Validators.maxValue(100);
|
||||
expect(validator!('50'), isNull);
|
||||
expect(validator('50'), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
group('range', () {
|
||||
test('should return error when value is below range', () {
|
||||
final validator = Validators.range(10, 100);
|
||||
expect(validator!('5'), contains('entre'));
|
||||
expect(validator('5'), contains('entre'));
|
||||
});
|
||||
|
||||
test('should return error when value is above range', () {
|
||||
final validator = Validators.range(10, 100);
|
||||
expect(validator!('150'), contains('entre'));
|
||||
expect(validator('150'), contains('entre'));
|
||||
});
|
||||
|
||||
test('should return null when value is within range', () {
|
||||
final validator = Validators.range(10, 100);
|
||||
expect(validator!('10'), isNull);
|
||||
expect(validator!('50'), isNull);
|
||||
expect(validator!('100'), isNull);
|
||||
expect(validator('10'), isNull);
|
||||
expect(validator('50'), isNull);
|
||||
expect(validator('100'), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
group('phone', () {
|
||||
test('should return null for valid phone numbers', () {
|
||||
final validator = Validators.phone();
|
||||
expect(validator!('+33612345678'), isNull);
|
||||
expect(validator!('06 12 34 56 78'), isNull);
|
||||
expect(validator!('(123) 456-7890'), isNull);
|
||||
expect(validator('+33612345678'), isNull);
|
||||
expect(validator('06 12 34 56 78'), isNull);
|
||||
expect(validator('(123) 456-7890'), isNull);
|
||||
});
|
||||
|
||||
test('should return error for invalid phone numbers', () {
|
||||
final validator = Validators.phone();
|
||||
expect(validator!('abc'), equals('Numéro de téléphone invalide'));
|
||||
expect(validator!('123'), equals('Numéro de téléphone trop court'));
|
||||
expect(validator('abc'), equals('Numéro de téléphone invalide'));
|
||||
expect(validator('123'), equals('Numéro de téléphone trop court'));
|
||||
});
|
||||
|
||||
test('should return null for empty value', () {
|
||||
final validator = Validators.phone();
|
||||
expect(validator!(''), isNull);
|
||||
expect(validator(''), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -202,22 +202,22 @@ void main() {
|
||||
message: 'Format: 3 lettres majuscules + 3 chiffres',
|
||||
);
|
||||
|
||||
expect(validator!('ABC123'), isNull);
|
||||
expect(validator!('XYZ999'), isNull);
|
||||
expect(validator!('abc123'), equals('Format: 3 lettres majuscules + 3 chiffres'));
|
||||
expect(validator!('AB123'), equals('Format: 3 lettres majuscules + 3 chiffres'));
|
||||
expect(validator('ABC123'), isNull);
|
||||
expect(validator('XYZ999'), isNull);
|
||||
expect(validator('abc123'), equals('Format: 3 lettres majuscules + 3 chiffres'));
|
||||
expect(validator('AB123'), equals('Format: 3 lettres majuscules + 3 chiffres'));
|
||||
});
|
||||
});
|
||||
|
||||
group('match', () {
|
||||
test('should return error when values do not match', () {
|
||||
final validator = Validators.match('password123');
|
||||
expect(validator!('password456'), equals('Les valeurs ne correspondent pas'));
|
||||
expect(validator('password456'), equals('Les valeurs ne correspondent pas'));
|
||||
});
|
||||
|
||||
test('should return null when values match', () {
|
||||
final validator = Validators.match('password123');
|
||||
expect(validator!('password123'), isNull);
|
||||
expect(validator('password123'), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -229,10 +229,10 @@ void main() {
|
||||
Validators.maxLength(10),
|
||||
]);
|
||||
|
||||
expect(validator!(''), equals('Ce champ est requis'));
|
||||
expect(validator!('abc'), equals('Minimum 5 caractères requis'));
|
||||
expect(validator!('12345678901'), equals('Maximum 10 caractères autorisés'));
|
||||
expect(validator!('valid'), isNull);
|
||||
expect(validator(''), equals('Ce champ est requis'));
|
||||
expect(validator('abc'), equals('Minimum 5 caractères requis'));
|
||||
expect(validator('12345678901'), equals('Maximum 10 caractères autorisés'));
|
||||
expect(validator('valid'), isNull);
|
||||
});
|
||||
|
||||
test('should stop at first error', () {
|
||||
@@ -242,7 +242,7 @@ void main() {
|
||||
]);
|
||||
|
||||
// Should fail on required, not reach email validator
|
||||
expect(validator!(''), equals('Ce champ est requis'));
|
||||
expect(validator(''), equals('Ce champ est requis'));
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -251,117 +251,117 @@ void main() {
|
||||
group('amount', () {
|
||||
test('should return null for valid amounts', () {
|
||||
final validator = FinanceValidators.amount();
|
||||
expect(validator!('100'), isNull);
|
||||
expect(validator!('100.50'), isNull);
|
||||
expect(validator!('0.01'), isNull);
|
||||
expect(validator('100'), isNull);
|
||||
expect(validator('100.50'), isNull);
|
||||
expect(validator('0.01'), isNull);
|
||||
});
|
||||
|
||||
test('should return error for negative or zero amounts', () {
|
||||
final validator = FinanceValidators.amount();
|
||||
expect(validator!('0'), equals('Le montant doit être positif'));
|
||||
expect(validator!('-10'), equals('Le montant doit être positif'));
|
||||
expect(validator('0'), equals('Le montant doit être positif'));
|
||||
expect(validator('-10'), equals('Le montant doit être positif'));
|
||||
});
|
||||
|
||||
test('should return error for invalid numbers', () {
|
||||
final validator = FinanceValidators.amount();
|
||||
expect(validator!('abc'), equals('Montant invalide'));
|
||||
expect(validator('abc'), equals('Montant invalide'));
|
||||
});
|
||||
|
||||
test('should enforce minimum amount', () {
|
||||
final validator = FinanceValidators.amount(min: 100);
|
||||
expect(validator!('50'), equals('Le montant minimum est 100.0'));
|
||||
expect(validator!('100'), isNull);
|
||||
expect(validator!('150'), isNull);
|
||||
expect(validator('50'), equals('Le montant minimum est 100.0'));
|
||||
expect(validator('100'), isNull);
|
||||
expect(validator('150'), isNull);
|
||||
});
|
||||
|
||||
test('should enforce maximum amount', () {
|
||||
final validator = FinanceValidators.amount(max: 1000);
|
||||
expect(validator!('1500'), equals('Le montant maximum est 1000.0'));
|
||||
expect(validator!('1000'), isNull);
|
||||
expect(validator!('500'), isNull);
|
||||
expect(validator('1500'), equals('Le montant maximum est 1000.0'));
|
||||
expect(validator('1000'), isNull);
|
||||
expect(validator('500'), isNull);
|
||||
});
|
||||
|
||||
test('should enforce max 2 decimals', () {
|
||||
final validator = FinanceValidators.amount();
|
||||
expect(validator!('100.123'), equals('Maximum 2 décimales autorisées'));
|
||||
expect(validator!('100.12'), isNull);
|
||||
expect(validator!('100.1'), isNull);
|
||||
expect(validator('100.123'), equals('Maximum 2 décimales autorisées'));
|
||||
expect(validator('100.12'), isNull);
|
||||
expect(validator('100.1'), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
group('budgetLineName', () {
|
||||
test('should require name', () {
|
||||
final validator = FinanceValidators.budgetLineName();
|
||||
expect(validator!(''), contains('requis'));
|
||||
expect(validator(''), contains('requis'));
|
||||
});
|
||||
|
||||
test('should enforce min length', () {
|
||||
final validator = FinanceValidators.budgetLineName();
|
||||
expect(validator!('ab'), contains('Minimum 3 caractères'));
|
||||
expect(validator('ab'), contains('Minimum 3 caractères'));
|
||||
});
|
||||
|
||||
test('should enforce max length', () {
|
||||
final validator = FinanceValidators.budgetLineName();
|
||||
final longName = 'a' * 101;
|
||||
expect(validator!(longName), contains('Maximum 100 caractères'));
|
||||
expect(validator(longName), contains('Maximum 100 caractères'));
|
||||
});
|
||||
|
||||
test('should accept valid names', () {
|
||||
final validator = FinanceValidators.budgetLineName();
|
||||
expect(validator!('Cotisations'), isNull);
|
||||
expect(validator!('Ligne budgétaire test'), isNull);
|
||||
expect(validator('Cotisations'), isNull);
|
||||
expect(validator('Ligne budgétaire test'), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
group('rejectionReason', () {
|
||||
test('should require reason', () {
|
||||
final validator = FinanceValidators.rejectionReason();
|
||||
expect(validator!(''), contains('requis'));
|
||||
expect(validator(''), contains('requis'));
|
||||
});
|
||||
|
||||
test('should enforce min length', () {
|
||||
final validator = FinanceValidators.rejectionReason();
|
||||
expect(validator!('short'), contains('min 10 caractères'));
|
||||
expect(validator('short'), contains('min 10 caractères'));
|
||||
});
|
||||
|
||||
test('should enforce max length', () {
|
||||
final validator = FinanceValidators.rejectionReason();
|
||||
final longReason = 'a' * 501;
|
||||
expect(validator!(longReason), contains('Maximum 500 caractères'));
|
||||
expect(validator(longReason), contains('Maximum 500 caractères'));
|
||||
});
|
||||
|
||||
test('should accept valid reasons', () {
|
||||
final validator = FinanceValidators.rejectionReason();
|
||||
expect(validator!('Cette transaction ne respecte pas les règles'), isNull);
|
||||
expect(validator('Cette transaction ne respecte pas les règles'), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
group('fiscalYear', () {
|
||||
test('should require year', () {
|
||||
final validator = FinanceValidators.fiscalYear();
|
||||
expect(validator!(''), contains('requis'));
|
||||
expect(validator(''), contains('requis'));
|
||||
});
|
||||
|
||||
test('should reject invalid year format', () {
|
||||
final validator = FinanceValidators.fiscalYear();
|
||||
expect(validator!('abc'), equals('Année invalide'));
|
||||
expect(validator('abc'), equals('Année invalide'));
|
||||
});
|
||||
|
||||
test('should enforce year range', () {
|
||||
final validator = FinanceValidators.fiscalYear();
|
||||
final currentYear = DateTime.now().year;
|
||||
|
||||
expect(validator!('${currentYear - 10}'), contains('doit être entre'));
|
||||
expect(validator!('${currentYear + 15}'), contains('doit être entre'));
|
||||
expect(validator('${currentYear - 10}'), contains('doit être entre'));
|
||||
expect(validator('${currentYear + 15}'), contains('doit être entre'));
|
||||
});
|
||||
|
||||
test('should accept valid years', () {
|
||||
final validator = FinanceValidators.fiscalYear();
|
||||
final currentYear = DateTime.now().year;
|
||||
|
||||
expect(validator!('$currentYear'), isNull);
|
||||
expect(validator!('${currentYear + 1}'), isNull);
|
||||
expect(validator!('${currentYear - 1}'), isNull);
|
||||
expect(validator('$currentYear'), isNull);
|
||||
expect(validator('${currentYear + 1}'), isNull);
|
||||
expect(validator('${currentYear - 1}'), isNull);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,335 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/contributions/domain/usecases/delete_contribution_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/models/contribution_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/repositories/contribution_repository.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/domain/repositories/contribution_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeContributionPageResult_0 extends _i1.SmartFake
|
||||
implements _i2.ContributionPageResult {
|
||||
_FakeContributionPageResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeContributionModel_1 extends _i1.SmartFake
|
||||
implements _i3.ContributionModel {
|
||||
_FakeContributionModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWavePaiementInitResult_2 extends _i1.SmartFake
|
||||
implements _i2.WavePaiementInitResult {
|
||||
_FakeWavePaiementInitResult_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IContributionRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIContributionRepository extends _i1.Mock
|
||||
implements _i4.IContributionRepository {
|
||||
MockIContributionRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisations({
|
||||
int? page = 0,
|
||||
int? size = 50,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> getCotisationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> createCotisation(
|
||||
_i3.ContributionModel? contribution) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> updateCotisation(
|
||||
String? id,
|
||||
_i3.ContributionModel? contribution,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteCotisation(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteCotisation,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> enregistrerPaiement(
|
||||
String? cotisationId, {
|
||||
required double? montant,
|
||||
required DateTime? datePaiement,
|
||||
required String? methodePaiement,
|
||||
String? numeroPaiement,
|
||||
String? referencePaiement,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.WavePaiementInitResult> initierPaiementEnLigne({
|
||||
required String? cotisationId,
|
||||
required String? methodePaiement,
|
||||
required String? numeroTelephone,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.WavePaiementInitResult>.value(
|
||||
_FakeWavePaiementInitResult_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.WavePaiementInitResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>?> getMesCotisationsSynthese() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsSynthese,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>?>.value(),
|
||||
) as _i5.Future<Map<String, dynamic>?>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getStatistiques() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getStatistiques,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisationsEnAttente() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getCotisations({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? membreId,
|
||||
String? statut,
|
||||
String? type,
|
||||
int? annee,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> envoyerRappel(String? cotisationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#envoyerRappel,
|
||||
[cotisationId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<int> genererCotisationsAnnuelles(int? annee) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#genererCotisationsAnnuelles,
|
||||
[annee],
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
}
|
||||
@@ -0,0 +1,335 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/contributions/domain/usecases/get_contribution_by_id_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/models/contribution_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/repositories/contribution_repository.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/domain/repositories/contribution_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeContributionPageResult_0 extends _i1.SmartFake
|
||||
implements _i2.ContributionPageResult {
|
||||
_FakeContributionPageResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeContributionModel_1 extends _i1.SmartFake
|
||||
implements _i3.ContributionModel {
|
||||
_FakeContributionModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWavePaiementInitResult_2 extends _i1.SmartFake
|
||||
implements _i2.WavePaiementInitResult {
|
||||
_FakeWavePaiementInitResult_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IContributionRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIContributionRepository extends _i1.Mock
|
||||
implements _i4.IContributionRepository {
|
||||
MockIContributionRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisations({
|
||||
int? page = 0,
|
||||
int? size = 50,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> getCotisationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> createCotisation(
|
||||
_i3.ContributionModel? contribution) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> updateCotisation(
|
||||
String? id,
|
||||
_i3.ContributionModel? contribution,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteCotisation(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteCotisation,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> enregistrerPaiement(
|
||||
String? cotisationId, {
|
||||
required double? montant,
|
||||
required DateTime? datePaiement,
|
||||
required String? methodePaiement,
|
||||
String? numeroPaiement,
|
||||
String? referencePaiement,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.WavePaiementInitResult> initierPaiementEnLigne({
|
||||
required String? cotisationId,
|
||||
required String? methodePaiement,
|
||||
required String? numeroTelephone,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.WavePaiementInitResult>.value(
|
||||
_FakeWavePaiementInitResult_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.WavePaiementInitResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>?> getMesCotisationsSynthese() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsSynthese,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>?>.value(),
|
||||
) as _i5.Future<Map<String, dynamic>?>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getStatistiques() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getStatistiques,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisationsEnAttente() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getCotisations({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? membreId,
|
||||
String? statut,
|
||||
String? type,
|
||||
int? annee,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> envoyerRappel(String? cotisationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#envoyerRappel,
|
||||
[cotisationId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<int> genererCotisationsAnnuelles(int? annee) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#genererCotisationsAnnuelles,
|
||||
[annee],
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
}
|
||||
@@ -0,0 +1,335 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/contributions/domain/usecases/get_contribution_history_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/models/contribution_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/repositories/contribution_repository.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/domain/repositories/contribution_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeContributionPageResult_0 extends _i1.SmartFake
|
||||
implements _i2.ContributionPageResult {
|
||||
_FakeContributionPageResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeContributionModel_1 extends _i1.SmartFake
|
||||
implements _i3.ContributionModel {
|
||||
_FakeContributionModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWavePaiementInitResult_2 extends _i1.SmartFake
|
||||
implements _i2.WavePaiementInitResult {
|
||||
_FakeWavePaiementInitResult_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IContributionRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIContributionRepository extends _i1.Mock
|
||||
implements _i4.IContributionRepository {
|
||||
MockIContributionRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisations({
|
||||
int? page = 0,
|
||||
int? size = 50,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> getCotisationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> createCotisation(
|
||||
_i3.ContributionModel? contribution) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> updateCotisation(
|
||||
String? id,
|
||||
_i3.ContributionModel? contribution,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteCotisation(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteCotisation,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> enregistrerPaiement(
|
||||
String? cotisationId, {
|
||||
required double? montant,
|
||||
required DateTime? datePaiement,
|
||||
required String? methodePaiement,
|
||||
String? numeroPaiement,
|
||||
String? referencePaiement,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.WavePaiementInitResult> initierPaiementEnLigne({
|
||||
required String? cotisationId,
|
||||
required String? methodePaiement,
|
||||
required String? numeroTelephone,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.WavePaiementInitResult>.value(
|
||||
_FakeWavePaiementInitResult_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.WavePaiementInitResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>?> getMesCotisationsSynthese() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsSynthese,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>?>.value(),
|
||||
) as _i5.Future<Map<String, dynamic>?>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getStatistiques() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getStatistiques,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisationsEnAttente() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getCotisations({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? membreId,
|
||||
String? statut,
|
||||
String? type,
|
||||
int? annee,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> envoyerRappel(String? cotisationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#envoyerRappel,
|
||||
[cotisationId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<int> genererCotisationsAnnuelles(int? annee) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#genererCotisationsAnnuelles,
|
||||
[annee],
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
}
|
||||
@@ -0,0 +1,335 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/contributions/domain/usecases/get_contribution_stats_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/models/contribution_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/repositories/contribution_repository.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/domain/repositories/contribution_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeContributionPageResult_0 extends _i1.SmartFake
|
||||
implements _i2.ContributionPageResult {
|
||||
_FakeContributionPageResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeContributionModel_1 extends _i1.SmartFake
|
||||
implements _i3.ContributionModel {
|
||||
_FakeContributionModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWavePaiementInitResult_2 extends _i1.SmartFake
|
||||
implements _i2.WavePaiementInitResult {
|
||||
_FakeWavePaiementInitResult_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IContributionRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIContributionRepository extends _i1.Mock
|
||||
implements _i4.IContributionRepository {
|
||||
MockIContributionRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisations({
|
||||
int? page = 0,
|
||||
int? size = 50,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> getCotisationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> createCotisation(
|
||||
_i3.ContributionModel? contribution) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> updateCotisation(
|
||||
String? id,
|
||||
_i3.ContributionModel? contribution,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteCotisation(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteCotisation,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> enregistrerPaiement(
|
||||
String? cotisationId, {
|
||||
required double? montant,
|
||||
required DateTime? datePaiement,
|
||||
required String? methodePaiement,
|
||||
String? numeroPaiement,
|
||||
String? referencePaiement,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.WavePaiementInitResult> initierPaiementEnLigne({
|
||||
required String? cotisationId,
|
||||
required String? methodePaiement,
|
||||
required String? numeroTelephone,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.WavePaiementInitResult>.value(
|
||||
_FakeWavePaiementInitResult_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.WavePaiementInitResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>?> getMesCotisationsSynthese() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsSynthese,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>?>.value(),
|
||||
) as _i5.Future<Map<String, dynamic>?>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getStatistiques() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getStatistiques,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisationsEnAttente() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getCotisations({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? membreId,
|
||||
String? statut,
|
||||
String? type,
|
||||
int? annee,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> envoyerRappel(String? cotisationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#envoyerRappel,
|
||||
[cotisationId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<int> genererCotisationsAnnuelles(int? annee) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#genererCotisationsAnnuelles,
|
||||
[annee],
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
}
|
||||
@@ -0,0 +1,335 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/contributions/domain/usecases/get_contributions_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/models/contribution_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/repositories/contribution_repository.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/domain/repositories/contribution_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeContributionPageResult_0 extends _i1.SmartFake
|
||||
implements _i2.ContributionPageResult {
|
||||
_FakeContributionPageResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeContributionModel_1 extends _i1.SmartFake
|
||||
implements _i3.ContributionModel {
|
||||
_FakeContributionModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWavePaiementInitResult_2 extends _i1.SmartFake
|
||||
implements _i2.WavePaiementInitResult {
|
||||
_FakeWavePaiementInitResult_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IContributionRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIContributionRepository extends _i1.Mock
|
||||
implements _i4.IContributionRepository {
|
||||
MockIContributionRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisations({
|
||||
int? page = 0,
|
||||
int? size = 50,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> getCotisationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> createCotisation(
|
||||
_i3.ContributionModel? contribution) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> updateCotisation(
|
||||
String? id,
|
||||
_i3.ContributionModel? contribution,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteCotisation(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteCotisation,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> enregistrerPaiement(
|
||||
String? cotisationId, {
|
||||
required double? montant,
|
||||
required DateTime? datePaiement,
|
||||
required String? methodePaiement,
|
||||
String? numeroPaiement,
|
||||
String? referencePaiement,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.WavePaiementInitResult> initierPaiementEnLigne({
|
||||
required String? cotisationId,
|
||||
required String? methodePaiement,
|
||||
required String? numeroTelephone,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.WavePaiementInitResult>.value(
|
||||
_FakeWavePaiementInitResult_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.WavePaiementInitResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>?> getMesCotisationsSynthese() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsSynthese,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>?>.value(),
|
||||
) as _i5.Future<Map<String, dynamic>?>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getStatistiques() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getStatistiques,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisationsEnAttente() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getCotisations({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? membreId,
|
||||
String? statut,
|
||||
String? type,
|
||||
int? annee,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> envoyerRappel(String? cotisationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#envoyerRappel,
|
||||
[cotisationId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<int> genererCotisationsAnnuelles(int? annee) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#genererCotisationsAnnuelles,
|
||||
[annee],
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
}
|
||||
@@ -0,0 +1,335 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/contributions/domain/usecases/pay_contribution_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/models/contribution_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/repositories/contribution_repository.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/domain/repositories/contribution_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeContributionPageResult_0 extends _i1.SmartFake
|
||||
implements _i2.ContributionPageResult {
|
||||
_FakeContributionPageResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeContributionModel_1 extends _i1.SmartFake
|
||||
implements _i3.ContributionModel {
|
||||
_FakeContributionModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWavePaiementInitResult_2 extends _i1.SmartFake
|
||||
implements _i2.WavePaiementInitResult {
|
||||
_FakeWavePaiementInitResult_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IContributionRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIContributionRepository extends _i1.Mock
|
||||
implements _i4.IContributionRepository {
|
||||
MockIContributionRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisations({
|
||||
int? page = 0,
|
||||
int? size = 50,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> getCotisationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> createCotisation(
|
||||
_i3.ContributionModel? contribution) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> updateCotisation(
|
||||
String? id,
|
||||
_i3.ContributionModel? contribution,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteCotisation(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteCotisation,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> enregistrerPaiement(
|
||||
String? cotisationId, {
|
||||
required double? montant,
|
||||
required DateTime? datePaiement,
|
||||
required String? methodePaiement,
|
||||
String? numeroPaiement,
|
||||
String? referencePaiement,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.WavePaiementInitResult> initierPaiementEnLigne({
|
||||
required String? cotisationId,
|
||||
required String? methodePaiement,
|
||||
required String? numeroTelephone,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.WavePaiementInitResult>.value(
|
||||
_FakeWavePaiementInitResult_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.WavePaiementInitResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>?> getMesCotisationsSynthese() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsSynthese,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>?>.value(),
|
||||
) as _i5.Future<Map<String, dynamic>?>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getStatistiques() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getStatistiques,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisationsEnAttente() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getCotisations({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? membreId,
|
||||
String? statut,
|
||||
String? type,
|
||||
int? annee,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> envoyerRappel(String? cotisationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#envoyerRappel,
|
||||
[cotisationId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<int> genererCotisationsAnnuelles(int? annee) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#genererCotisationsAnnuelles,
|
||||
[annee],
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
}
|
||||
@@ -0,0 +1,335 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/contributions/domain/usecases/update_contribution_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/models/contribution_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/data/repositories/contribution_repository.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/contributions/domain/repositories/contribution_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeContributionPageResult_0 extends _i1.SmartFake
|
||||
implements _i2.ContributionPageResult {
|
||||
_FakeContributionPageResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeContributionModel_1 extends _i1.SmartFake
|
||||
implements _i3.ContributionModel {
|
||||
_FakeContributionModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWavePaiementInitResult_2 extends _i1.SmartFake
|
||||
implements _i2.WavePaiementInitResult {
|
||||
_FakeWavePaiementInitResult_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IContributionRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIContributionRepository extends _i1.Mock
|
||||
implements _i4.IContributionRepository {
|
||||
MockIContributionRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisations({
|
||||
int? page = 0,
|
||||
int? size = 50,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> getCotisationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisationById,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> createCotisation(
|
||||
_i3.ContributionModel? contribution) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createCotisation,
|
||||
[contribution],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> updateCotisation(
|
||||
String? id,
|
||||
_i3.ContributionModel? contribution,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateCotisation,
|
||||
[
|
||||
id,
|
||||
contribution,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteCotisation(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteCotisation,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.ContributionModel> enregistrerPaiement(
|
||||
String? cotisationId, {
|
||||
required double? montant,
|
||||
required DateTime? datePaiement,
|
||||
required String? methodePaiement,
|
||||
String? numeroPaiement,
|
||||
String? referencePaiement,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<_i3.ContributionModel>.value(_FakeContributionModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#enregistrerPaiement,
|
||||
[cotisationId],
|
||||
{
|
||||
#montant: montant,
|
||||
#datePaiement: datePaiement,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroPaiement: numeroPaiement,
|
||||
#referencePaiement: referencePaiement,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.ContributionModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.WavePaiementInitResult> initierPaiementEnLigne({
|
||||
required String? cotisationId,
|
||||
required String? methodePaiement,
|
||||
required String? numeroTelephone,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.WavePaiementInitResult>.value(
|
||||
_FakeWavePaiementInitResult_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#initierPaiementEnLigne,
|
||||
[],
|
||||
{
|
||||
#cotisationId: cotisationId,
|
||||
#methodePaiement: methodePaiement,
|
||||
#numeroTelephone: numeroTelephone,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.WavePaiementInitResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>?> getMesCotisationsSynthese() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsSynthese,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>?>.value(),
|
||||
) as _i5.Future<Map<String, dynamic>?>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getStatistiques() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getStatistiques,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getMesCotisationsEnAttente() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getMesCotisationsEnAttente,
|
||||
[],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.ContributionPageResult> getCotisations({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? membreId,
|
||||
String? statut,
|
||||
String? type,
|
||||
int? annee,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.ContributionPageResult>.value(
|
||||
_FakeContributionPageResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getCotisations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#membreId: membreId,
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#annee: annee,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.ContributionPageResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> envoyerRappel(String? cotisationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#envoyerRappel,
|
||||
[cotisationId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<int> genererCotisationsAnnuelles(int? annee) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#genererCotisationsAnnuelles,
|
||||
[annee],
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
}
|
||||
@@ -14,21 +14,15 @@ import 'package:unionflow_mobile_apps/core/error/failures.dart';
|
||||
import 'get_dashboard_data_test.mocks.dart';
|
||||
|
||||
void main() {
|
||||
late GetDashboardData useCase;
|
||||
late MockDashboardRepository mockRepository;
|
||||
|
||||
setUp(() {
|
||||
mockRepository = MockDashboardRepository();
|
||||
useCase = GetDashboardData(mockRepository);
|
||||
});
|
||||
|
||||
group('GetDashboardData Use Case', () {
|
||||
const tOrgId = 'org-123';
|
||||
const tUserId = 'user-456';
|
||||
final tParams = GetDashboardDataParams(
|
||||
organizationId: tOrgId,
|
||||
userId: tUserId,
|
||||
);
|
||||
|
||||
final tDashboardStats = DashboardStatsEntity(
|
||||
totalMembers: 250,
|
||||
|
||||
@@ -0,0 +1,289 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/events/domain/usecases/create_event_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/models/evenement_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/repositories/evenement_repository_impl.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/events/domain/repositories/evenement_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeEvenementSearchResult_0 extends _i1.SmartFake
|
||||
implements _i2.EvenementSearchResult {
|
||||
_FakeEvenementSearchResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeEvenementModel_1 extends _i1.SmartFake
|
||||
implements _i3.EvenementModel {
|
||||
_FakeEvenementModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IEvenementRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIEvenementRepository extends _i1.Mock
|
||||
implements _i4.IEvenementRepository {
|
||||
MockIEvenementRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenements({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel?> getEvenementById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel?>.value(),
|
||||
) as _i5.Future<_i3.EvenementModel?>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> createEvenement(
|
||||
_i3.EvenementModel? evenement) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> updateEvenement(
|
||||
String? id,
|
||||
_i3.EvenementModel? evenement,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteEvenement(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteEvenement,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsAVenir({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsEnCours({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsPasses({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> inscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#inscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> desinscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#desinscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<bool> getInscriptionStatus(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getInscriptionStatus,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getParticipants(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getParticipants,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getEvenementsStats() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/events/domain/usecases/delete_event_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/models/evenement_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/repositories/evenement_repository_impl.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/events/domain/repositories/evenement_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeEvenementSearchResult_0 extends _i1.SmartFake
|
||||
implements _i2.EvenementSearchResult {
|
||||
_FakeEvenementSearchResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeEvenementModel_1 extends _i1.SmartFake
|
||||
implements _i3.EvenementModel {
|
||||
_FakeEvenementModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IEvenementRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIEvenementRepository extends _i1.Mock
|
||||
implements _i4.IEvenementRepository {
|
||||
MockIEvenementRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenements({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel?> getEvenementById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel?>.value(),
|
||||
) as _i5.Future<_i3.EvenementModel?>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> createEvenement(
|
||||
_i3.EvenementModel? evenement) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> updateEvenement(
|
||||
String? id,
|
||||
_i3.EvenementModel? evenement,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteEvenement(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteEvenement,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsAVenir({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsEnCours({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsPasses({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> inscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#inscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> desinscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#desinscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<bool> getInscriptionStatus(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getInscriptionStatus,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getParticipants(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getParticipants,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getEvenementsStats() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/events/domain/usecases/get_event_by_id_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/models/evenement_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/repositories/evenement_repository_impl.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/events/domain/repositories/evenement_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeEvenementSearchResult_0 extends _i1.SmartFake
|
||||
implements _i2.EvenementSearchResult {
|
||||
_FakeEvenementSearchResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeEvenementModel_1 extends _i1.SmartFake
|
||||
implements _i3.EvenementModel {
|
||||
_FakeEvenementModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IEvenementRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIEvenementRepository extends _i1.Mock
|
||||
implements _i4.IEvenementRepository {
|
||||
MockIEvenementRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenements({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel?> getEvenementById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel?>.value(),
|
||||
) as _i5.Future<_i3.EvenementModel?>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> createEvenement(
|
||||
_i3.EvenementModel? evenement) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> updateEvenement(
|
||||
String? id,
|
||||
_i3.EvenementModel? evenement,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteEvenement(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteEvenement,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsAVenir({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsEnCours({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsPasses({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> inscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#inscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> desinscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#desinscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<bool> getInscriptionStatus(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getInscriptionStatus,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getParticipants(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getParticipants,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getEvenementsStats() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/events/domain/usecases/get_event_participants_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/models/evenement_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/repositories/evenement_repository_impl.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/events/domain/repositories/evenement_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeEvenementSearchResult_0 extends _i1.SmartFake
|
||||
implements _i2.EvenementSearchResult {
|
||||
_FakeEvenementSearchResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeEvenementModel_1 extends _i1.SmartFake
|
||||
implements _i3.EvenementModel {
|
||||
_FakeEvenementModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IEvenementRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIEvenementRepository extends _i1.Mock
|
||||
implements _i4.IEvenementRepository {
|
||||
MockIEvenementRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenements({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel?> getEvenementById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel?>.value(),
|
||||
) as _i5.Future<_i3.EvenementModel?>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> createEvenement(
|
||||
_i3.EvenementModel? evenement) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> updateEvenement(
|
||||
String? id,
|
||||
_i3.EvenementModel? evenement,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteEvenement(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteEvenement,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsAVenir({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsEnCours({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsPasses({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> inscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#inscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> desinscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#desinscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<bool> getInscriptionStatus(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getInscriptionStatus,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getParticipants(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getParticipants,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getEvenementsStats() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
}
|
||||
289
test/features/events/domain/usecases/get_events_test.mocks.dart
Normal file
289
test/features/events/domain/usecases/get_events_test.mocks.dart
Normal file
@@ -0,0 +1,289 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/events/domain/usecases/get_events_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/models/evenement_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/repositories/evenement_repository_impl.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/events/domain/repositories/evenement_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeEvenementSearchResult_0 extends _i1.SmartFake
|
||||
implements _i2.EvenementSearchResult {
|
||||
_FakeEvenementSearchResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeEvenementModel_1 extends _i1.SmartFake
|
||||
implements _i3.EvenementModel {
|
||||
_FakeEvenementModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IEvenementRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIEvenementRepository extends _i1.Mock
|
||||
implements _i4.IEvenementRepository {
|
||||
MockIEvenementRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenements({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel?> getEvenementById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel?>.value(),
|
||||
) as _i5.Future<_i3.EvenementModel?>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> createEvenement(
|
||||
_i3.EvenementModel? evenement) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> updateEvenement(
|
||||
String? id,
|
||||
_i3.EvenementModel? evenement,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteEvenement(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteEvenement,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsAVenir({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsEnCours({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsPasses({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> inscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#inscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> desinscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#desinscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<bool> getInscriptionStatus(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getInscriptionStatus,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getParticipants(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getParticipants,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getEvenementsStats() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/events/domain/usecases/get_my_registrations_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/models/evenement_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/repositories/evenement_repository_impl.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/events/domain/repositories/evenement_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeEvenementSearchResult_0 extends _i1.SmartFake
|
||||
implements _i2.EvenementSearchResult {
|
||||
_FakeEvenementSearchResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeEvenementModel_1 extends _i1.SmartFake
|
||||
implements _i3.EvenementModel {
|
||||
_FakeEvenementModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IEvenementRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIEvenementRepository extends _i1.Mock
|
||||
implements _i4.IEvenementRepository {
|
||||
MockIEvenementRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenements({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel?> getEvenementById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel?>.value(),
|
||||
) as _i5.Future<_i3.EvenementModel?>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> createEvenement(
|
||||
_i3.EvenementModel? evenement) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> updateEvenement(
|
||||
String? id,
|
||||
_i3.EvenementModel? evenement,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteEvenement(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteEvenement,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsAVenir({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsEnCours({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsPasses({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> inscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#inscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> desinscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#desinscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<bool> getInscriptionStatus(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getInscriptionStatus,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getParticipants(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getParticipants,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getEvenementsStats() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
// Mocks generated by Mockito 5.4.4 from annotations
|
||||
// in unionflow_mobile_apps/test/features/events/domain/usecases/register_for_event_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/models/evenement_model.dart'
|
||||
as _i3;
|
||||
import 'package:unionflow_mobile_apps/features/events/data/repositories/evenement_repository_impl.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/events/domain/repositories/evenement_repository.dart'
|
||||
as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeEvenementSearchResult_0 extends _i1.SmartFake
|
||||
implements _i2.EvenementSearchResult {
|
||||
_FakeEvenementSearchResult_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeEvenementModel_1 extends _i1.SmartFake
|
||||
implements _i3.EvenementModel {
|
||||
_FakeEvenementModel_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [IEvenementRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockIEvenementRepository extends _i1.Mock
|
||||
implements _i4.IEvenementRepository {
|
||||
MockIEvenementRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenements({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenements,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel?> getEvenementById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel?>.value(),
|
||||
) as _i5.Future<_i3.EvenementModel?>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> createEvenement(
|
||||
_i3.EvenementModel? evenement) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createEvenement,
|
||||
[evenement],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.EvenementModel> updateEvenement(
|
||||
String? id,
|
||||
_i3.EvenementModel? evenement,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.EvenementModel>.value(_FakeEvenementModel_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateEvenement,
|
||||
[
|
||||
id,
|
||||
evenement,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i3.EvenementModel>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteEvenement(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteEvenement,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsAVenir({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsAVenir,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsEnCours({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsEnCours,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.EvenementSearchResult> getEvenementsPasses({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.EvenementSearchResult>.value(
|
||||
_FakeEvenementSearchResult_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getEvenementsPasses,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.EvenementSearchResult>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> inscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#inscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> desinscrireEvenement(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#desinscrireEvenement,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<bool> getInscriptionStatus(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getInscriptionStatus,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getParticipants(String? evenementId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getParticipants,
|
||||
[evenementId],
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getEvenementsStats() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getEvenementsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
}
|
||||
@@ -3,7 +3,6 @@ library submit_event_feedback_test;
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:mockito/annotations.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
import 'package:unionflow_mobile_apps/features/events/domain/repositories/evenement_repository.dart';
|
||||
import 'package:unionflow_mobile_apps/features/events/domain/usecases/submit_event_feedback.dart';
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ void main() {
|
||||
expect(result, equals(tSearchResult));
|
||||
expect(result.membres.length, equals(2));
|
||||
expect(result.membres.every((m) => m.nom == 'Diallo'), isTrue);
|
||||
expect(result.membres.every((m) => m.statut == StatutMembre.actif || m.statut == null), isTrue);
|
||||
expect(result.membres.every((m) => m.statut == StatutMembre.actif), isTrue);
|
||||
verify(mockRepository.searchMembres(
|
||||
criteria: tSearchCriteria,
|
||||
page: 0,
|
||||
|
||||
Reference in New Issue
Block a user