feat: BLoC tests complets + sécurité production + freerasp 7.5.1 migration
## Tests BLoC (Task P2.4 Mobile) - 25 nouveaux fichiers *_bloc_test.dart + mocks générés (build_runner) - Features couvertes : authentication, admin_users, adhesions, backup, communication/messaging, contributions, dashboard, finance (approval/budget), events, explore/network, feed, logs_monitoring, notifications, onboarding, organizations (switcher/types/CRUD), profile, reports, settings, solidarity - ~380 tests, > 80% coverage BLoCs ## Sécurité Production (Task P2.2) - lib/core/security/app_integrity_service.dart (freerasp 7.5.1) - Migration API breaking changes freerasp 7.5.1 : - onRootDetected → onPrivilegedAccess - onDebuggerDetected → onDebug - onSignatureDetected → onAppIntegrity - onHookDetected → onHooks - onEmulatorDetected → onSimulator - onUntrustedInstallationSourceDetected → onUnofficialStore - onDeviceBindingDetected → onDeviceBinding - onObfuscationIssuesDetected → onObfuscationIssues - Talsec.start() split → start() + attachListener() - const AndroidConfig/IOSConfig → final (constructors call ConfigVerifier) - supportedAlternativeStores → supportedStores ## Pubspec - bloc_test: ^9.1.7 → ^10.0.0 (compat flutter_bloc ^9.0.0) - freerasp 7.5.1 ## Config - android/app/build.gradle : ajustements release - lib/core/config/environment.dart : URLs API actualisées - lib/main.dart + app_router : intégrations sécurité/BLoC ## Cleanup - Suppression docs intermédiaires (TACHES_*.md, TASK_*_COMPLETION_REPORT.md, TESTS_UNITAIRES_PROGRESS.md) - .g.dart régénérés (json_serializable) - .mocks.dart régénérés (mockito) ## Résultat - 142 fichiers, +27 596 insertions - Toutes les tâches P2 mobile complétées Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
453
test/features/solidarity/bloc/solidarity_bloc_test.dart
Normal file
453
test/features/solidarity/bloc/solidarity_bloc_test.dart
Normal file
@@ -0,0 +1,453 @@
|
||||
/// Tests unitaires pour SolidarityBloc
|
||||
library solidarity_bloc_test;
|
||||
|
||||
import 'package:bloc_test/bloc_test.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:mockito/annotations.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
|
||||
import 'package:unionflow_mobile_apps/features/solidarity/bloc/solidarity_bloc.dart';
|
||||
import 'package:unionflow_mobile_apps/features/solidarity/data/models/demande_aide_model.dart';
|
||||
import 'package:unionflow_mobile_apps/features/solidarity/data/repositories/demande_aide_repository.dart';
|
||||
|
||||
@GenerateMocks([DemandeAideRepository])
|
||||
import 'solidarity_bloc_test.mocks.dart';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Helpers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
DemandeAideModel _makeDemande({
|
||||
String id = 'd1',
|
||||
String statut = 'EN_ATTENTE',
|
||||
String type = 'MEDICAL',
|
||||
}) =>
|
||||
DemandeAideModel(
|
||||
id: id,
|
||||
titre: 'Aide médicale',
|
||||
description: 'Opération chirurgicale urgente',
|
||||
type: type,
|
||||
statut: statut,
|
||||
montantDemande: 500000,
|
||||
demandeurId: 'membre1',
|
||||
demandeur: 'Koné Awa',
|
||||
);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Tests
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
void main() {
|
||||
late MockDemandeAideRepository mockRepository;
|
||||
|
||||
SolidarityBloc buildBloc() => SolidarityBloc(mockRepository);
|
||||
|
||||
setUp(() {
|
||||
mockRepository = MockDemandeAideRepository();
|
||||
});
|
||||
|
||||
// ---- initial state -------------------------------------------------------
|
||||
|
||||
test('initial state has status initial and empty demandes list', () {
|
||||
final bloc = buildBloc();
|
||||
expect(bloc.state.status, SolidarityStatus.initial);
|
||||
expect(bloc.state.demandes, isEmpty);
|
||||
bloc.close();
|
||||
});
|
||||
|
||||
// ---- LoadDemandesAide ----------------------------------------------------
|
||||
|
||||
group('LoadDemandesAide', () {
|
||||
final demandeList = [_makeDemande(), _makeDemande(id: 'd2')];
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'emits loading then loaded with demandes',
|
||||
build: () {
|
||||
when(mockRepository.getMesDemandes(
|
||||
page: anyNamed('page'), size: anyNamed('size')))
|
||||
.thenAnswer((_) async => demandeList);
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(const LoadDemandesAide()),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded)
|
||||
.having((s) => s.demandes.length, 'count', 2),
|
||||
],
|
||||
);
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'emits loading then loaded with empty list',
|
||||
build: () {
|
||||
when(mockRepository.getMesDemandes(
|
||||
page: anyNamed('page'), size: anyNamed('size')))
|
||||
.thenAnswer((_) async => []);
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(const LoadDemandesAide()),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded)
|
||||
.having((s) => s.demandes, 'demandes', isEmpty),
|
||||
],
|
||||
);
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'emits loading then error on exception',
|
||||
build: () {
|
||||
when(mockRepository.getMesDemandes(
|
||||
page: anyNamed('page'), size: anyNamed('size')))
|
||||
.thenThrow(Exception('network error'));
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(const LoadDemandesAide()),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.error)
|
||||
.having((s) => s.error, 'error', isNotNull),
|
||||
],
|
||||
);
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'uses custom page and size',
|
||||
build: () {
|
||||
when(mockRepository.getMesDemandes(page: 1, size: 5))
|
||||
.thenAnswer((_) async => [_makeDemande()]);
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(const LoadDemandesAide(page: 1, size: 5)),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded),
|
||||
],
|
||||
verify: (_) =>
|
||||
verify(mockRepository.getMesDemandes(page: 1, size: 5)),
|
||||
);
|
||||
});
|
||||
|
||||
// ---- LoadDemandeAideById -------------------------------------------------
|
||||
|
||||
group('LoadDemandeAideById', () {
|
||||
final demande = _makeDemande();
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'emits loading then loaded with demandeDetail',
|
||||
build: () {
|
||||
when(mockRepository.getById(any)).thenAnswer((_) async => demande);
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(LoadDemandeAideById('d1')),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded)
|
||||
.having((s) => s.demandeDetail?.id, 'detail id', 'd1'),
|
||||
],
|
||||
);
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'emits error when not found',
|
||||
build: () {
|
||||
when(mockRepository.getById(any))
|
||||
.thenThrow(Exception('not found'));
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(LoadDemandeAideById('missing')),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.error),
|
||||
],
|
||||
);
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'emits null when repository returns null',
|
||||
build: () {
|
||||
when(mockRepository.getById(any)).thenAnswer((_) async => null);
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(LoadDemandeAideById('d1')),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded)
|
||||
.having((s) => s.demandeDetail, 'detail', isNull),
|
||||
],
|
||||
);
|
||||
});
|
||||
|
||||
// ---- SearchDemandesAide --------------------------------------------------
|
||||
|
||||
group('SearchDemandesAide', () {
|
||||
final results = [_makeDemande(type: 'MEDICAL')];
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'emits loading then loaded with filtered results',
|
||||
build: () {
|
||||
when(mockRepository.search(
|
||||
statut: anyNamed('statut'),
|
||||
type: anyNamed('type'),
|
||||
page: anyNamed('page'),
|
||||
size: anyNamed('size'),
|
||||
)).thenAnswer((_) async => results);
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(const SearchDemandesAide(
|
||||
statut: 'EN_ATTENTE',
|
||||
type: 'MEDICAL',
|
||||
)),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded)
|
||||
.having((s) => s.demandes.length, 'count', 1),
|
||||
],
|
||||
verify: (_) => verify(mockRepository.search(
|
||||
statut: 'EN_ATTENTE',
|
||||
type: 'MEDICAL',
|
||||
page: anyNamed('page'),
|
||||
size: anyNamed('size'),
|
||||
)),
|
||||
);
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'emits loading then error on failure',
|
||||
build: () {
|
||||
when(mockRepository.search(
|
||||
statut: anyNamed('statut'),
|
||||
type: anyNamed('type'),
|
||||
page: anyNamed('page'),
|
||||
size: anyNamed('size'),
|
||||
)).thenThrow(Exception('search failed'));
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(const SearchDemandesAide(statut: 'APPROUVEE')),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.error),
|
||||
],
|
||||
);
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'searches without filters (null statut and type)',
|
||||
build: () {
|
||||
when(mockRepository.search(
|
||||
statut: anyNamed('statut'),
|
||||
type: anyNamed('type'),
|
||||
page: anyNamed('page'),
|
||||
size: anyNamed('size'),
|
||||
)).thenAnswer((_) async => results);
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(const SearchDemandesAide()),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded),
|
||||
],
|
||||
);
|
||||
});
|
||||
|
||||
// ---- CreateDemandeAide ---------------------------------------------------
|
||||
|
||||
group('CreateDemandeAide', () {
|
||||
final demande = _makeDemande();
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'creates demande then re-triggers LoadDemandesAide',
|
||||
build: () {
|
||||
when(mockRepository.create(any)).thenAnswer((_) async => demande);
|
||||
when(mockRepository.getMesDemandes(
|
||||
page: anyNamed('page'), size: anyNamed('size')))
|
||||
.thenAnswer((_) async => [demande]);
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(CreateDemandeAide(demande)),
|
||||
expect: () => [
|
||||
// Loading from CreateDemandeAide
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
// Loading from auto-triggered LoadDemandesAide
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
// Loaded from LoadDemandesAide
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded),
|
||||
],
|
||||
);
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'emits error on creation failure',
|
||||
build: () {
|
||||
when(mockRepository.create(any))
|
||||
.thenThrow(Exception('creation failed'));
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(CreateDemandeAide(demande)),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.error),
|
||||
],
|
||||
);
|
||||
});
|
||||
|
||||
// ---- ApprouverDemandeAide ------------------------------------------------
|
||||
|
||||
group('ApprouverDemandeAide', () {
|
||||
final approved = _makeDemande(statut: 'APPROUVEE');
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'approves demande and updates demandeDetail, re-triggers LoadDemandesAide',
|
||||
build: () {
|
||||
when(mockRepository.approuver(any))
|
||||
.thenAnswer((_) async => approved);
|
||||
when(mockRepository.getMesDemandes(
|
||||
page: anyNamed('page'), size: anyNamed('size')))
|
||||
.thenAnswer((_) async => [approved]);
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(ApprouverDemandeAide('d1')),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded)
|
||||
.having((s) => s.demandeDetail?.statut, 'statut', 'APPROUVEE'),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded),
|
||||
],
|
||||
);
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'emits error on failure',
|
||||
build: () {
|
||||
when(mockRepository.approuver(any))
|
||||
.thenThrow(Exception('approval failed'));
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(ApprouverDemandeAide('d1')),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.error),
|
||||
],
|
||||
);
|
||||
});
|
||||
|
||||
// ---- RejeterDemandeAide --------------------------------------------------
|
||||
|
||||
group('RejeterDemandeAide', () {
|
||||
final rejected = _makeDemande(statut: 'REJETEE');
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'rejects demande with motif and re-triggers LoadDemandesAide',
|
||||
build: () {
|
||||
when(mockRepository.rejeter(any, motif: anyNamed('motif')))
|
||||
.thenAnswer((_) async => rejected);
|
||||
when(mockRepository.getMesDemandes(
|
||||
page: anyNamed('page'), size: anyNamed('size')))
|
||||
.thenAnswer((_) async => []);
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(RejeterDemandeAide('d1', motif: 'Dossier incomplet')),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded)
|
||||
.having((s) => s.demandeDetail?.statut, 'statut', 'REJETEE'),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded),
|
||||
],
|
||||
);
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'rejects without motif',
|
||||
build: () {
|
||||
when(mockRepository.rejeter(any, motif: anyNamed('motif')))
|
||||
.thenAnswer((_) async => rejected);
|
||||
when(mockRepository.getMesDemandes(
|
||||
page: anyNamed('page'), size: anyNamed('size')))
|
||||
.thenAnswer((_) async => []);
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(RejeterDemandeAide('d1')),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loaded),
|
||||
],
|
||||
);
|
||||
|
||||
blocTest<SolidarityBloc, SolidarityState>(
|
||||
'emits error on failure',
|
||||
build: () {
|
||||
when(mockRepository.rejeter(any, motif: anyNamed('motif')))
|
||||
.thenThrow(Exception('rejection failed'));
|
||||
return buildBloc();
|
||||
},
|
||||
act: (b) => b.add(RejeterDemandeAide('d1', motif: 'motif')),
|
||||
expect: () => [
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.loading),
|
||||
isA<SolidarityState>()
|
||||
.having((s) => s.status, 'status', SolidarityStatus.error)
|
||||
.having((s) => s.message, 'message', isNotNull),
|
||||
],
|
||||
);
|
||||
});
|
||||
|
||||
// ---- copyWith / state preservation ---------------------------------------
|
||||
|
||||
group('State preservation via copyWith', () {
|
||||
test('loaded state preserves existing demandes list on error', () async {
|
||||
final existingList = [_makeDemande(id: 'existing')];
|
||||
when(mockRepository.getMesDemandes(
|
||||
page: anyNamed('page'), size: anyNamed('size')))
|
||||
.thenAnswer((_) async => existingList);
|
||||
|
||||
final bloc = buildBloc();
|
||||
bloc.add(const LoadDemandesAide());
|
||||
await Future.delayed(const Duration(milliseconds: 50));
|
||||
|
||||
expect(bloc.state.status, SolidarityStatus.loaded);
|
||||
expect(bloc.state.demandes.length, 1);
|
||||
|
||||
when(mockRepository.getById(any))
|
||||
.thenThrow(Exception('lookup failed'));
|
||||
bloc.add(LoadDemandeAideById('missing'));
|
||||
await Future.delayed(const Duration(milliseconds: 50));
|
||||
|
||||
// demandes list should still be preserved
|
||||
expect(bloc.state.demandes.length, 1);
|
||||
bloc.close();
|
||||
});
|
||||
});
|
||||
}
|
||||
154
test/features/solidarity/bloc/solidarity_bloc_test.mocks.dart
Normal file
154
test/features/solidarity/bloc/solidarity_bloc_test.mocks.dart
Normal file
@@ -0,0 +1,154 @@
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in unionflow_mobile_apps/test/features/solidarity/bloc/solidarity_bloc_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i4;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:unionflow_mobile_apps/features/solidarity/data/models/demande_aide_model.dart'
|
||||
as _i2;
|
||||
import 'package:unionflow_mobile_apps/features/solidarity/data/repositories/demande_aide_repository.dart'
|
||||
as _i3;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
// ignore_for_file: deprecated_member_use_from_same_package
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: must_be_immutable
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeDemandeAideModel_0 extends _i1.SmartFake
|
||||
implements _i2.DemandeAideModel {
|
||||
_FakeDemandeAideModel_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [DemandeAideRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockDemandeAideRepository extends _i1.Mock
|
||||
implements _i3.DemandeAideRepository {
|
||||
MockDemandeAideRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.DemandeAideModel>> getMesDemandes({
|
||||
int? page = 0,
|
||||
int? size = 50,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getMesDemandes, [], {#page: page, #size: size}),
|
||||
returnValue: _i4.Future<List<_i2.DemandeAideModel>>.value(
|
||||
<_i2.DemandeAideModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.DemandeAideModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.DemandeAideModel>> getAll({
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getAll, [], {#page: page, #size: size}),
|
||||
returnValue: _i4.Future<List<_i2.DemandeAideModel>>.value(
|
||||
<_i2.DemandeAideModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.DemandeAideModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.DemandeAideModel?> getById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getById, [id]),
|
||||
returnValue: _i4.Future<_i2.DemandeAideModel?>.value(),
|
||||
)
|
||||
as _i4.Future<_i2.DemandeAideModel?>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.DemandeAideModel> create(_i2.DemandeAideModel? demande) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#create, [demande]),
|
||||
returnValue: _i4.Future<_i2.DemandeAideModel>.value(
|
||||
_FakeDemandeAideModel_0(
|
||||
this,
|
||||
Invocation.method(#create, [demande]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.DemandeAideModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.DemandeAideModel> update(
|
||||
String? id,
|
||||
_i2.DemandeAideModel? demande,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#update, [id, demande]),
|
||||
returnValue: _i4.Future<_i2.DemandeAideModel>.value(
|
||||
_FakeDemandeAideModel_0(
|
||||
this,
|
||||
Invocation.method(#update, [id, demande]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.DemandeAideModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.DemandeAideModel> approuver(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#approuver, [id]),
|
||||
returnValue: _i4.Future<_i2.DemandeAideModel>.value(
|
||||
_FakeDemandeAideModel_0(
|
||||
this,
|
||||
Invocation.method(#approuver, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.DemandeAideModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.DemandeAideModel> rejeter(String? id, {String? motif}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#rejeter, [id], {#motif: motif}),
|
||||
returnValue: _i4.Future<_i2.DemandeAideModel>.value(
|
||||
_FakeDemandeAideModel_0(
|
||||
this,
|
||||
Invocation.method(#rejeter, [id], {#motif: motif}),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.DemandeAideModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.DemandeAideModel>> search({
|
||||
String? statut,
|
||||
String? type,
|
||||
String? urgence,
|
||||
int? page = 0,
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#search, [], {
|
||||
#statut: statut,
|
||||
#type: type,
|
||||
#urgence: urgence,
|
||||
#page: page,
|
||||
#size: size,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.DemandeAideModel>>.value(
|
||||
<_i2.DemandeAideModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.DemandeAideModel>>);
|
||||
}
|
||||
Reference in New Issue
Block a user