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:
@@ -28,13 +28,8 @@ import 'package:unionflow_mobile_apps/features/organizations/domain/repositories
|
||||
|
||||
class _FakeOrganizationModel_0 extends _i1.SmartFake
|
||||
implements _i2.OrganizationModel {
|
||||
_FakeOrganizationModel_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeOrganizationModel_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [IOrganizationRepository].
|
||||
@@ -53,57 +48,49 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getOrganizations, [], {
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> getMesOrganisations() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesOrganisations,
|
||||
[],
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getMesOrganisations, []),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel?> getOrganizationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
) as _i4.Future<_i2.OrganizationModel?>);
|
||||
Invocation.method(#getOrganizationById, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel?>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> createOrganization(
|
||||
_i2.OrganizationModel? organization) =>
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganization(
|
||||
@@ -111,69 +98,50 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> deleteOrganization(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
_i4.Future<void> deleteOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteOrganization, [id]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> activateOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> suspendOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> searchOrganizations({
|
||||
@@ -187,35 +155,33 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchOrganizations,
|
||||
[],
|
||||
{
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#searchOrganizations, [], {
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<Map<String, dynamic>>> getOrganizationMembers(
|
||||
String? organizationId) =>
|
||||
String? organizationId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationMembers,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
Invocation.method(#getOrganizationMembers, [organizationId]),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganizationConfig(
|
||||
@@ -223,43 +189,31 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
Map<String, dynamic>? config,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<Map<String, dynamic>> getOrganizationsStats() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
Invocation.method(#getOrganizationsStats, []),
|
||||
returnValue: _i4.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i4.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<int> getMembreCount(String? organizationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMembreCount,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
_i4.Future<int> getMembreCount(String? organizationId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getMembreCount, [organizationId]),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
)
|
||||
as _i4.Future<int>);
|
||||
}
|
||||
|
||||
@@ -28,13 +28,8 @@ import 'package:unionflow_mobile_apps/features/organizations/domain/repositories
|
||||
|
||||
class _FakeOrganizationModel_0 extends _i1.SmartFake
|
||||
implements _i2.OrganizationModel {
|
||||
_FakeOrganizationModel_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeOrganizationModel_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [IOrganizationRepository].
|
||||
@@ -53,57 +48,49 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getOrganizations, [], {
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> getMesOrganisations() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesOrganisations,
|
||||
[],
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getMesOrganisations, []),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel?> getOrganizationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
) as _i4.Future<_i2.OrganizationModel?>);
|
||||
Invocation.method(#getOrganizationById, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel?>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> createOrganization(
|
||||
_i2.OrganizationModel? organization) =>
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganization(
|
||||
@@ -111,69 +98,50 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> deleteOrganization(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
_i4.Future<void> deleteOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteOrganization, [id]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> activateOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> suspendOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> searchOrganizations({
|
||||
@@ -187,35 +155,33 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchOrganizations,
|
||||
[],
|
||||
{
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#searchOrganizations, [], {
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<Map<String, dynamic>>> getOrganizationMembers(
|
||||
String? organizationId) =>
|
||||
String? organizationId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationMembers,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
Invocation.method(#getOrganizationMembers, [organizationId]),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganizationConfig(
|
||||
@@ -223,43 +189,31 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
Map<String, dynamic>? config,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<Map<String, dynamic>> getOrganizationsStats() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
Invocation.method(#getOrganizationsStats, []),
|
||||
returnValue: _i4.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i4.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<int> getMembreCount(String? organizationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMembreCount,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
_i4.Future<int> getMembreCount(String? organizationId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getMembreCount, [organizationId]),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
)
|
||||
as _i4.Future<int>);
|
||||
}
|
||||
|
||||
@@ -28,13 +28,8 @@ import 'package:unionflow_mobile_apps/features/organizations/domain/repositories
|
||||
|
||||
class _FakeOrganizationModel_0 extends _i1.SmartFake
|
||||
implements _i2.OrganizationModel {
|
||||
_FakeOrganizationModel_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeOrganizationModel_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [IOrganizationRepository].
|
||||
@@ -53,57 +48,49 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getOrganizations, [], {
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> getMesOrganisations() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesOrganisations,
|
||||
[],
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getMesOrganisations, []),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel?> getOrganizationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
) as _i4.Future<_i2.OrganizationModel?>);
|
||||
Invocation.method(#getOrganizationById, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel?>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> createOrganization(
|
||||
_i2.OrganizationModel? organization) =>
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganization(
|
||||
@@ -111,69 +98,50 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> deleteOrganization(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
_i4.Future<void> deleteOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteOrganization, [id]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> activateOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> suspendOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> searchOrganizations({
|
||||
@@ -187,35 +155,33 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchOrganizations,
|
||||
[],
|
||||
{
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#searchOrganizations, [], {
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<Map<String, dynamic>>> getOrganizationMembers(
|
||||
String? organizationId) =>
|
||||
String? organizationId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationMembers,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
Invocation.method(#getOrganizationMembers, [organizationId]),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganizationConfig(
|
||||
@@ -223,43 +189,31 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
Map<String, dynamic>? config,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<Map<String, dynamic>> getOrganizationsStats() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
Invocation.method(#getOrganizationsStats, []),
|
||||
returnValue: _i4.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i4.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<int> getMembreCount(String? organizationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMembreCount,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
_i4.Future<int> getMembreCount(String? organizationId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getMembreCount, [organizationId]),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
)
|
||||
as _i4.Future<int>);
|
||||
}
|
||||
|
||||
@@ -28,13 +28,8 @@ import 'package:unionflow_mobile_apps/features/organizations/domain/repositories
|
||||
|
||||
class _FakeOrganizationModel_0 extends _i1.SmartFake
|
||||
implements _i2.OrganizationModel {
|
||||
_FakeOrganizationModel_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeOrganizationModel_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [IOrganizationRepository].
|
||||
@@ -53,57 +48,49 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getOrganizations, [], {
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> getMesOrganisations() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesOrganisations,
|
||||
[],
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getMesOrganisations, []),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel?> getOrganizationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
) as _i4.Future<_i2.OrganizationModel?>);
|
||||
Invocation.method(#getOrganizationById, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel?>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> createOrganization(
|
||||
_i2.OrganizationModel? organization) =>
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganization(
|
||||
@@ -111,69 +98,50 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> deleteOrganization(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
_i4.Future<void> deleteOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteOrganization, [id]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> activateOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> suspendOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> searchOrganizations({
|
||||
@@ -187,35 +155,33 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchOrganizations,
|
||||
[],
|
||||
{
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#searchOrganizations, [], {
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<Map<String, dynamic>>> getOrganizationMembers(
|
||||
String? organizationId) =>
|
||||
String? organizationId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationMembers,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
Invocation.method(#getOrganizationMembers, [organizationId]),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganizationConfig(
|
||||
@@ -223,43 +189,31 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
Map<String, dynamic>? config,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<Map<String, dynamic>> getOrganizationsStats() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
Invocation.method(#getOrganizationsStats, []),
|
||||
returnValue: _i4.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i4.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<int> getMembreCount(String? organizationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMembreCount,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
_i4.Future<int> getMembreCount(String? organizationId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getMembreCount, [organizationId]),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
)
|
||||
as _i4.Future<int>);
|
||||
}
|
||||
|
||||
@@ -28,13 +28,8 @@ import 'package:unionflow_mobile_apps/features/organizations/domain/repositories
|
||||
|
||||
class _FakeOrganizationModel_0 extends _i1.SmartFake
|
||||
implements _i2.OrganizationModel {
|
||||
_FakeOrganizationModel_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeOrganizationModel_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [IOrganizationRepository].
|
||||
@@ -53,57 +48,49 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getOrganizations, [], {
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> getMesOrganisations() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesOrganisations,
|
||||
[],
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getMesOrganisations, []),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel?> getOrganizationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
) as _i4.Future<_i2.OrganizationModel?>);
|
||||
Invocation.method(#getOrganizationById, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel?>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> createOrganization(
|
||||
_i2.OrganizationModel? organization) =>
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganization(
|
||||
@@ -111,69 +98,50 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> deleteOrganization(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
_i4.Future<void> deleteOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteOrganization, [id]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> activateOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> suspendOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> searchOrganizations({
|
||||
@@ -187,35 +155,33 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchOrganizations,
|
||||
[],
|
||||
{
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#searchOrganizations, [], {
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<Map<String, dynamic>>> getOrganizationMembers(
|
||||
String? organizationId) =>
|
||||
String? organizationId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationMembers,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
Invocation.method(#getOrganizationMembers, [organizationId]),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganizationConfig(
|
||||
@@ -223,43 +189,31 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
Map<String, dynamic>? config,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<Map<String, dynamic>> getOrganizationsStats() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
Invocation.method(#getOrganizationsStats, []),
|
||||
returnValue: _i4.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i4.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<int> getMembreCount(String? organizationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMembreCount,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
_i4.Future<int> getMembreCount(String? organizationId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getMembreCount, [organizationId]),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
)
|
||||
as _i4.Future<int>);
|
||||
}
|
||||
|
||||
@@ -28,13 +28,8 @@ import 'package:unionflow_mobile_apps/features/organizations/domain/repositories
|
||||
|
||||
class _FakeOrganizationModel_0 extends _i1.SmartFake
|
||||
implements _i2.OrganizationModel {
|
||||
_FakeOrganizationModel_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeOrganizationModel_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [IOrganizationRepository].
|
||||
@@ -53,57 +48,49 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getOrganizations, [], {
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> getMesOrganisations() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesOrganisations,
|
||||
[],
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getMesOrganisations, []),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel?> getOrganizationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
) as _i4.Future<_i2.OrganizationModel?>);
|
||||
Invocation.method(#getOrganizationById, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel?>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> createOrganization(
|
||||
_i2.OrganizationModel? organization) =>
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganization(
|
||||
@@ -111,69 +98,50 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> deleteOrganization(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
_i4.Future<void> deleteOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteOrganization, [id]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> activateOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> suspendOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> searchOrganizations({
|
||||
@@ -187,35 +155,33 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchOrganizations,
|
||||
[],
|
||||
{
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#searchOrganizations, [], {
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<Map<String, dynamic>>> getOrganizationMembers(
|
||||
String? organizationId) =>
|
||||
String? organizationId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationMembers,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
Invocation.method(#getOrganizationMembers, [organizationId]),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganizationConfig(
|
||||
@@ -223,43 +189,31 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
Map<String, dynamic>? config,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<Map<String, dynamic>> getOrganizationsStats() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
Invocation.method(#getOrganizationsStats, []),
|
||||
returnValue: _i4.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i4.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<int> getMembreCount(String? organizationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMembreCount,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
_i4.Future<int> getMembreCount(String? organizationId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getMembreCount, [organizationId]),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
)
|
||||
as _i4.Future<int>);
|
||||
}
|
||||
|
||||
@@ -28,13 +28,8 @@ import 'package:unionflow_mobile_apps/features/organizations/domain/repositories
|
||||
|
||||
class _FakeOrganizationModel_0 extends _i1.SmartFake
|
||||
implements _i2.OrganizationModel {
|
||||
_FakeOrganizationModel_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeOrganizationModel_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [IOrganizationRepository].
|
||||
@@ -53,57 +48,49 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
String? recherche,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizations,
|
||||
[],
|
||||
{
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getOrganizations, [], {
|
||||
#page: page,
|
||||
#size: size,
|
||||
#recherche: recherche,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> getMesOrganisations() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMesOrganisations,
|
||||
[],
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#getMesOrganisations, []),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel?> getOrganizationById(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
) as _i4.Future<_i2.OrganizationModel?>);
|
||||
Invocation.method(#getOrganizationById, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel?>.value(),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel?>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> createOrganization(
|
||||
_i2.OrganizationModel? organization) =>
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#createOrganization,
|
||||
[organization],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#createOrganization, [organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganization(
|
||||
@@ -111,69 +98,50 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
_i2.OrganizationModel? organization,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganization,
|
||||
[
|
||||
id,
|
||||
organization,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganization, [id, organization]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> deleteOrganization(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
_i4.Future<void> deleteOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteOrganization, [id]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> activateOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#activateOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#activateOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> suspendOrganization(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#suspendOrganization,
|
||||
[id],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#suspendOrganization, [id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<_i2.OrganizationModel>> searchOrganizations({
|
||||
@@ -187,35 +155,33 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
int? size = 20,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchOrganizations,
|
||||
[],
|
||||
{
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[]),
|
||||
) as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
Invocation.method(#searchOrganizations, [], {
|
||||
#nom: nom,
|
||||
#type: type,
|
||||
#statut: statut,
|
||||
#ville: ville,
|
||||
#region: region,
|
||||
#pays: pays,
|
||||
#page: page,
|
||||
#size: size,
|
||||
}),
|
||||
returnValue: _i4.Future<List<_i2.OrganizationModel>>.value(
|
||||
<_i2.OrganizationModel>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<_i2.OrganizationModel>>);
|
||||
|
||||
@override
|
||||
_i4.Future<List<Map<String, dynamic>>> getOrganizationMembers(
|
||||
String? organizationId) =>
|
||||
String? organizationId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationMembers,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
Invocation.method(#getOrganizationMembers, [organizationId]),
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[],
|
||||
),
|
||||
)
|
||||
as _i4.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.OrganizationModel> updateOrganizationConfig(
|
||||
@@ -223,43 +189,31 @@ class MockIOrganizationRepository extends _i1.Mock
|
||||
Map<String, dynamic>? config,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.OrganizationModel>.value(_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateOrganizationConfig,
|
||||
[
|
||||
id,
|
||||
config,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.OrganizationModel>);
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
returnValue: _i4.Future<_i2.OrganizationModel>.value(
|
||||
_FakeOrganizationModel_0(
|
||||
this,
|
||||
Invocation.method(#updateOrganizationConfig, [id, config]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.OrganizationModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<Map<String, dynamic>> getOrganizationsStats() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOrganizationsStats,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
Invocation.method(#getOrganizationsStats, []),
|
||||
returnValue: _i4.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i4.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<int> getMembreCount(String? organizationId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMembreCount,
|
||||
[organizationId],
|
||||
),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
_i4.Future<int> getMembreCount(String? organizationId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getMembreCount, [organizationId]),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
)
|
||||
as _i4.Future<int>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user