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:
dahoud
2026-04-21 12:42:35 +00:00
parent 33f5b5a707
commit 37db88672b
142 changed files with 27599 additions and 16068 deletions

View File

@@ -33,13 +33,8 @@ import 'package:unionflow_mobile_apps/features/finance_workflow/domain/repositor
// ignore_for_file: invalid_use_of_internal_member
class _FakeEither_0<L, R> extends _i1.SmartFake implements _i2.Either<L, R> {
_FakeEither_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
_FakeEither_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
/// A class which mocks [FinanceWorkflowRepository].
@@ -53,104 +48,90 @@ class MockFinanceWorkflowRepository extends _i1.Mock
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getPendingApprovals({String? organizationId}) => (super.noSuchMethod(
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
getPendingApprovals({String? organizationId}) =>
(super.noSuchMethod(
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> getApprovalById(
String? approvalId) =>
String? approvalId,
) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalById,
[approvalId],
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#getApprovalById,
[approvalId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
Invocation.method(#getApprovalById, [approvalId]),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#getApprovalById, [approvalId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> approveTransaction({
required String? approvalId,
String? comment,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
approveTransaction({required String? approvalId, String? comment}) =>
(super.noSuchMethod(
Invocation.method(
#approveTransaction,
[],
{
#approvalId: approvalId,
#comment: comment,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#approveTransaction,
[],
{
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> rejectTransaction({
required String? approvalId,
required String? reason,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
rejectTransaction({required String? approvalId, required String? reason}) =>
(super.noSuchMethod(
Invocation.method(
#rejectTransaction,
[],
{
#approvalId: approvalId,
#reason: reason,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#rejectTransaction,
[],
{
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> requestApproval({
@@ -159,68 +140,60 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required double? amount,
}) =>
(super.noSuchMethod(
Invocation.method(
#requestApproval,
[],
{
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#requestApproval,
[],
{
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getApprovalsHistory({
getApprovalsHistory({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
_i6.ApprovalStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
(super.noSuchMethod(
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>> getBudgets({
@@ -229,48 +202,39 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? year,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgets,
[],
{
#organizationId: organizationId,
#status: status,
#year: year,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(
#getBudgets,
[],
{
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> getBudgetById(
String? budgetId) =>
String? budgetId,
) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetById,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#getBudgetById,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
Invocation.method(#getBudgetById, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#getBudgetById, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> createBudget({
@@ -283,26 +247,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required List<_i7.BudgetLine>? lines,
}) =>
(super.noSuchMethod(
Invocation.method(
#createBudget,
[],
{
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#createBudget,
[],
{
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
@@ -310,10 +255,23 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#year: year,
#month: month,
#lines: lines,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> updateBudget({
@@ -324,75 +282,62 @@ class MockFinanceWorkflowRepository extends _i1.Mock
_i7.BudgetStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateBudget,
[],
{
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#updateBudget,
[],
{
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, void>> deleteBudget(String? budgetId) =>
(super.noSuchMethod(
Invocation.method(
#deleteBudget,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(
#deleteBudget,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, void>>);
Invocation.method(#deleteBudget, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(#deleteBudget, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, void>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking(
{required String? budgetId}) =>
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking({
required String? budgetId,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
Invocation.method(#getBudgetTracking, [], {#budgetId: budgetId}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getBudgetTracking, [], {
#budgetId: budgetId,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAuditLogs({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAuditLogs({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
@@ -402,27 +347,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? limit,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAuditLogs,
[],
{
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
@@ -430,43 +355,55 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAnomalies({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAnomalies({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAnomalies,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAnomalies,
[],
{
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, String>> exportAuditLogs({
@@ -476,31 +413,25 @@ class MockFinanceWorkflowRepository extends _i1.Mock
String? format = 'csv',
}) =>
(super.noSuchMethod(
Invocation.method(
#exportAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(
#exportAuditLogs,
[],
{
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, String>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, String>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getWorkflowStats({
@@ -509,28 +440,22 @@ class MockFinanceWorkflowRepository extends _i1.Mock
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getWorkflowStats,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getWorkflowStats,
[],
{
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}

View File

@@ -33,13 +33,8 @@ import 'package:unionflow_mobile_apps/features/finance_workflow/domain/repositor
// ignore_for_file: invalid_use_of_internal_member
class _FakeEither_0<L, R> extends _i1.SmartFake implements _i2.Either<L, R> {
_FakeEither_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
_FakeEither_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
/// A class which mocks [FinanceWorkflowRepository].
@@ -53,104 +48,90 @@ class MockFinanceWorkflowRepository extends _i1.Mock
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getPendingApprovals({String? organizationId}) => (super.noSuchMethod(
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
getPendingApprovals({String? organizationId}) =>
(super.noSuchMethod(
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> getApprovalById(
String? approvalId) =>
String? approvalId,
) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalById,
[approvalId],
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#getApprovalById,
[approvalId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
Invocation.method(#getApprovalById, [approvalId]),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#getApprovalById, [approvalId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> approveTransaction({
required String? approvalId,
String? comment,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
approveTransaction({required String? approvalId, String? comment}) =>
(super.noSuchMethod(
Invocation.method(
#approveTransaction,
[],
{
#approvalId: approvalId,
#comment: comment,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#approveTransaction,
[],
{
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> rejectTransaction({
required String? approvalId,
required String? reason,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
rejectTransaction({required String? approvalId, required String? reason}) =>
(super.noSuchMethod(
Invocation.method(
#rejectTransaction,
[],
{
#approvalId: approvalId,
#reason: reason,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#rejectTransaction,
[],
{
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> requestApproval({
@@ -159,68 +140,60 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required double? amount,
}) =>
(super.noSuchMethod(
Invocation.method(
#requestApproval,
[],
{
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#requestApproval,
[],
{
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getApprovalsHistory({
getApprovalsHistory({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
_i6.ApprovalStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
(super.noSuchMethod(
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>> getBudgets({
@@ -229,48 +202,39 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? year,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgets,
[],
{
#organizationId: organizationId,
#status: status,
#year: year,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(
#getBudgets,
[],
{
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> getBudgetById(
String? budgetId) =>
String? budgetId,
) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetById,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#getBudgetById,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
Invocation.method(#getBudgetById, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#getBudgetById, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> createBudget({
@@ -283,26 +247,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required List<_i7.BudgetLine>? lines,
}) =>
(super.noSuchMethod(
Invocation.method(
#createBudget,
[],
{
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#createBudget,
[],
{
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
@@ -310,10 +255,23 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#year: year,
#month: month,
#lines: lines,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> updateBudget({
@@ -324,75 +282,62 @@ class MockFinanceWorkflowRepository extends _i1.Mock
_i7.BudgetStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateBudget,
[],
{
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#updateBudget,
[],
{
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, void>> deleteBudget(String? budgetId) =>
(super.noSuchMethod(
Invocation.method(
#deleteBudget,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(
#deleteBudget,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, void>>);
Invocation.method(#deleteBudget, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(#deleteBudget, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, void>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking(
{required String? budgetId}) =>
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking({
required String? budgetId,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
Invocation.method(#getBudgetTracking, [], {#budgetId: budgetId}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getBudgetTracking, [], {
#budgetId: budgetId,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAuditLogs({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAuditLogs({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
@@ -402,27 +347,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? limit,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAuditLogs,
[],
{
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
@@ -430,43 +355,55 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAnomalies({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAnomalies({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAnomalies,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAnomalies,
[],
{
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, String>> exportAuditLogs({
@@ -476,31 +413,25 @@ class MockFinanceWorkflowRepository extends _i1.Mock
String? format = 'csv',
}) =>
(super.noSuchMethod(
Invocation.method(
#exportAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(
#exportAuditLogs,
[],
{
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, String>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, String>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getWorkflowStats({
@@ -509,28 +440,22 @@ class MockFinanceWorkflowRepository extends _i1.Mock
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getWorkflowStats,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getWorkflowStats,
[],
{
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}

View File

@@ -33,13 +33,8 @@ import 'package:unionflow_mobile_apps/features/finance_workflow/domain/repositor
// ignore_for_file: invalid_use_of_internal_member
class _FakeEither_0<L, R> extends _i1.SmartFake implements _i2.Either<L, R> {
_FakeEither_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
_FakeEither_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
/// A class which mocks [FinanceWorkflowRepository].
@@ -53,104 +48,90 @@ class MockFinanceWorkflowRepository extends _i1.Mock
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getPendingApprovals({String? organizationId}) => (super.noSuchMethod(
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
getPendingApprovals({String? organizationId}) =>
(super.noSuchMethod(
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> getApprovalById(
String? approvalId) =>
String? approvalId,
) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalById,
[approvalId],
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#getApprovalById,
[approvalId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
Invocation.method(#getApprovalById, [approvalId]),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#getApprovalById, [approvalId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> approveTransaction({
required String? approvalId,
String? comment,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
approveTransaction({required String? approvalId, String? comment}) =>
(super.noSuchMethod(
Invocation.method(
#approveTransaction,
[],
{
#approvalId: approvalId,
#comment: comment,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#approveTransaction,
[],
{
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> rejectTransaction({
required String? approvalId,
required String? reason,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
rejectTransaction({required String? approvalId, required String? reason}) =>
(super.noSuchMethod(
Invocation.method(
#rejectTransaction,
[],
{
#approvalId: approvalId,
#reason: reason,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#rejectTransaction,
[],
{
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> requestApproval({
@@ -159,68 +140,60 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required double? amount,
}) =>
(super.noSuchMethod(
Invocation.method(
#requestApproval,
[],
{
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#requestApproval,
[],
{
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getApprovalsHistory({
getApprovalsHistory({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
_i6.ApprovalStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
(super.noSuchMethod(
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>> getBudgets({
@@ -229,48 +202,39 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? year,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgets,
[],
{
#organizationId: organizationId,
#status: status,
#year: year,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(
#getBudgets,
[],
{
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> getBudgetById(
String? budgetId) =>
String? budgetId,
) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetById,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#getBudgetById,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
Invocation.method(#getBudgetById, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#getBudgetById, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> createBudget({
@@ -283,26 +247,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required List<_i7.BudgetLine>? lines,
}) =>
(super.noSuchMethod(
Invocation.method(
#createBudget,
[],
{
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#createBudget,
[],
{
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
@@ -310,10 +255,23 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#year: year,
#month: month,
#lines: lines,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> updateBudget({
@@ -324,75 +282,62 @@ class MockFinanceWorkflowRepository extends _i1.Mock
_i7.BudgetStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateBudget,
[],
{
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#updateBudget,
[],
{
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, void>> deleteBudget(String? budgetId) =>
(super.noSuchMethod(
Invocation.method(
#deleteBudget,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(
#deleteBudget,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, void>>);
Invocation.method(#deleteBudget, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(#deleteBudget, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, void>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking(
{required String? budgetId}) =>
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking({
required String? budgetId,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
Invocation.method(#getBudgetTracking, [], {#budgetId: budgetId}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getBudgetTracking, [], {
#budgetId: budgetId,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAuditLogs({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAuditLogs({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
@@ -402,27 +347,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? limit,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAuditLogs,
[],
{
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
@@ -430,43 +355,55 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAnomalies({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAnomalies({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAnomalies,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAnomalies,
[],
{
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, String>> exportAuditLogs({
@@ -476,31 +413,25 @@ class MockFinanceWorkflowRepository extends _i1.Mock
String? format = 'csv',
}) =>
(super.noSuchMethod(
Invocation.method(
#exportAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(
#exportAuditLogs,
[],
{
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, String>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, String>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getWorkflowStats({
@@ -509,28 +440,22 @@ class MockFinanceWorkflowRepository extends _i1.Mock
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getWorkflowStats,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getWorkflowStats,
[],
{
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}

View File

@@ -33,13 +33,8 @@ import 'package:unionflow_mobile_apps/features/finance_workflow/domain/repositor
// ignore_for_file: invalid_use_of_internal_member
class _FakeEither_0<L, R> extends _i1.SmartFake implements _i2.Either<L, R> {
_FakeEither_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
_FakeEither_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
/// A class which mocks [FinanceWorkflowRepository].
@@ -53,104 +48,90 @@ class MockFinanceWorkflowRepository extends _i1.Mock
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getPendingApprovals({String? organizationId}) => (super.noSuchMethod(
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
getPendingApprovals({String? organizationId}) =>
(super.noSuchMethod(
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> getApprovalById(
String? approvalId) =>
String? approvalId,
) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalById,
[approvalId],
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#getApprovalById,
[approvalId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
Invocation.method(#getApprovalById, [approvalId]),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#getApprovalById, [approvalId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> approveTransaction({
required String? approvalId,
String? comment,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
approveTransaction({required String? approvalId, String? comment}) =>
(super.noSuchMethod(
Invocation.method(
#approveTransaction,
[],
{
#approvalId: approvalId,
#comment: comment,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#approveTransaction,
[],
{
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> rejectTransaction({
required String? approvalId,
required String? reason,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
rejectTransaction({required String? approvalId, required String? reason}) =>
(super.noSuchMethod(
Invocation.method(
#rejectTransaction,
[],
{
#approvalId: approvalId,
#reason: reason,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#rejectTransaction,
[],
{
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> requestApproval({
@@ -159,68 +140,60 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required double? amount,
}) =>
(super.noSuchMethod(
Invocation.method(
#requestApproval,
[],
{
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#requestApproval,
[],
{
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getApprovalsHistory({
getApprovalsHistory({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
_i6.ApprovalStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
(super.noSuchMethod(
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>> getBudgets({
@@ -229,48 +202,39 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? year,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgets,
[],
{
#organizationId: organizationId,
#status: status,
#year: year,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(
#getBudgets,
[],
{
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> getBudgetById(
String? budgetId) =>
String? budgetId,
) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetById,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#getBudgetById,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
Invocation.method(#getBudgetById, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#getBudgetById, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> createBudget({
@@ -283,26 +247,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required List<_i7.BudgetLine>? lines,
}) =>
(super.noSuchMethod(
Invocation.method(
#createBudget,
[],
{
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#createBudget,
[],
{
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
@@ -310,10 +255,23 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#year: year,
#month: month,
#lines: lines,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> updateBudget({
@@ -324,75 +282,62 @@ class MockFinanceWorkflowRepository extends _i1.Mock
_i7.BudgetStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateBudget,
[],
{
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#updateBudget,
[],
{
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, void>> deleteBudget(String? budgetId) =>
(super.noSuchMethod(
Invocation.method(
#deleteBudget,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(
#deleteBudget,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, void>>);
Invocation.method(#deleteBudget, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(#deleteBudget, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, void>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking(
{required String? budgetId}) =>
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking({
required String? budgetId,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
Invocation.method(#getBudgetTracking, [], {#budgetId: budgetId}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getBudgetTracking, [], {
#budgetId: budgetId,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAuditLogs({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAuditLogs({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
@@ -402,27 +347,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? limit,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAuditLogs,
[],
{
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
@@ -430,43 +355,55 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAnomalies({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAnomalies({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAnomalies,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAnomalies,
[],
{
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, String>> exportAuditLogs({
@@ -476,31 +413,25 @@ class MockFinanceWorkflowRepository extends _i1.Mock
String? format = 'csv',
}) =>
(super.noSuchMethod(
Invocation.method(
#exportAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(
#exportAuditLogs,
[],
{
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, String>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, String>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getWorkflowStats({
@@ -509,28 +440,22 @@ class MockFinanceWorkflowRepository extends _i1.Mock
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getWorkflowStats,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getWorkflowStats,
[],
{
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}

View File

@@ -33,13 +33,8 @@ import 'package:unionflow_mobile_apps/features/finance_workflow/domain/repositor
// ignore_for_file: invalid_use_of_internal_member
class _FakeEither_0<L, R> extends _i1.SmartFake implements _i2.Either<L, R> {
_FakeEither_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
_FakeEither_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
/// A class which mocks [FinanceWorkflowRepository].
@@ -53,104 +48,90 @@ class MockFinanceWorkflowRepository extends _i1.Mock
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getPendingApprovals({String? organizationId}) => (super.noSuchMethod(
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
getPendingApprovals({String? organizationId}) =>
(super.noSuchMethod(
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> getApprovalById(
String? approvalId) =>
String? approvalId,
) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalById,
[approvalId],
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#getApprovalById,
[approvalId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
Invocation.method(#getApprovalById, [approvalId]),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#getApprovalById, [approvalId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> approveTransaction({
required String? approvalId,
String? comment,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
approveTransaction({required String? approvalId, String? comment}) =>
(super.noSuchMethod(
Invocation.method(
#approveTransaction,
[],
{
#approvalId: approvalId,
#comment: comment,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#approveTransaction,
[],
{
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> rejectTransaction({
required String? approvalId,
required String? reason,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
rejectTransaction({required String? approvalId, required String? reason}) =>
(super.noSuchMethod(
Invocation.method(
#rejectTransaction,
[],
{
#approvalId: approvalId,
#reason: reason,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#rejectTransaction,
[],
{
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> requestApproval({
@@ -159,68 +140,60 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required double? amount,
}) =>
(super.noSuchMethod(
Invocation.method(
#requestApproval,
[],
{
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#requestApproval,
[],
{
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getApprovalsHistory({
getApprovalsHistory({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
_i6.ApprovalStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
(super.noSuchMethod(
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>> getBudgets({
@@ -229,48 +202,39 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? year,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgets,
[],
{
#organizationId: organizationId,
#status: status,
#year: year,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(
#getBudgets,
[],
{
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> getBudgetById(
String? budgetId) =>
String? budgetId,
) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetById,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#getBudgetById,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
Invocation.method(#getBudgetById, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#getBudgetById, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> createBudget({
@@ -283,26 +247,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required List<_i7.BudgetLine>? lines,
}) =>
(super.noSuchMethod(
Invocation.method(
#createBudget,
[],
{
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#createBudget,
[],
{
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
@@ -310,10 +255,23 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#year: year,
#month: month,
#lines: lines,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> updateBudget({
@@ -324,75 +282,62 @@ class MockFinanceWorkflowRepository extends _i1.Mock
_i7.BudgetStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateBudget,
[],
{
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#updateBudget,
[],
{
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, void>> deleteBudget(String? budgetId) =>
(super.noSuchMethod(
Invocation.method(
#deleteBudget,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(
#deleteBudget,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, void>>);
Invocation.method(#deleteBudget, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(#deleteBudget, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, void>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking(
{required String? budgetId}) =>
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking({
required String? budgetId,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
Invocation.method(#getBudgetTracking, [], {#budgetId: budgetId}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getBudgetTracking, [], {
#budgetId: budgetId,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAuditLogs({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAuditLogs({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
@@ -402,27 +347,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? limit,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAuditLogs,
[],
{
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
@@ -430,43 +355,55 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAnomalies({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAnomalies({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAnomalies,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAnomalies,
[],
{
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, String>> exportAuditLogs({
@@ -476,31 +413,25 @@ class MockFinanceWorkflowRepository extends _i1.Mock
String? format = 'csv',
}) =>
(super.noSuchMethod(
Invocation.method(
#exportAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(
#exportAuditLogs,
[],
{
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, String>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, String>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getWorkflowStats({
@@ -509,28 +440,22 @@ class MockFinanceWorkflowRepository extends _i1.Mock
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getWorkflowStats,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getWorkflowStats,
[],
{
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}

View File

@@ -33,13 +33,8 @@ import 'package:unionflow_mobile_apps/features/finance_workflow/domain/repositor
// ignore_for_file: invalid_use_of_internal_member
class _FakeEither_0<L, R> extends _i1.SmartFake implements _i2.Either<L, R> {
_FakeEither_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
_FakeEither_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
/// A class which mocks [FinanceWorkflowRepository].
@@ -53,104 +48,90 @@ class MockFinanceWorkflowRepository extends _i1.Mock
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getPendingApprovals({String? organizationId}) => (super.noSuchMethod(
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
getPendingApprovals({String? organizationId}) =>
(super.noSuchMethod(
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> getApprovalById(
String? approvalId) =>
String? approvalId,
) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalById,
[approvalId],
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#getApprovalById,
[approvalId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
Invocation.method(#getApprovalById, [approvalId]),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#getApprovalById, [approvalId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> approveTransaction({
required String? approvalId,
String? comment,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
approveTransaction({required String? approvalId, String? comment}) =>
(super.noSuchMethod(
Invocation.method(
#approveTransaction,
[],
{
#approvalId: approvalId,
#comment: comment,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#approveTransaction,
[],
{
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> rejectTransaction({
required String? approvalId,
required String? reason,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
rejectTransaction({required String? approvalId, required String? reason}) =>
(super.noSuchMethod(
Invocation.method(
#rejectTransaction,
[],
{
#approvalId: approvalId,
#reason: reason,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#rejectTransaction,
[],
{
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> requestApproval({
@@ -159,68 +140,60 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required double? amount,
}) =>
(super.noSuchMethod(
Invocation.method(
#requestApproval,
[],
{
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#requestApproval,
[],
{
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getApprovalsHistory({
getApprovalsHistory({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
_i6.ApprovalStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
(super.noSuchMethod(
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>> getBudgets({
@@ -229,48 +202,39 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? year,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgets,
[],
{
#organizationId: organizationId,
#status: status,
#year: year,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(
#getBudgets,
[],
{
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> getBudgetById(
String? budgetId) =>
String? budgetId,
) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetById,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#getBudgetById,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
Invocation.method(#getBudgetById, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#getBudgetById, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> createBudget({
@@ -283,26 +247,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required List<_i7.BudgetLine>? lines,
}) =>
(super.noSuchMethod(
Invocation.method(
#createBudget,
[],
{
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#createBudget,
[],
{
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
@@ -310,10 +255,23 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#year: year,
#month: month,
#lines: lines,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> updateBudget({
@@ -324,75 +282,62 @@ class MockFinanceWorkflowRepository extends _i1.Mock
_i7.BudgetStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateBudget,
[],
{
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#updateBudget,
[],
{
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, void>> deleteBudget(String? budgetId) =>
(super.noSuchMethod(
Invocation.method(
#deleteBudget,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(
#deleteBudget,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, void>>);
Invocation.method(#deleteBudget, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(#deleteBudget, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, void>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking(
{required String? budgetId}) =>
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking({
required String? budgetId,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
Invocation.method(#getBudgetTracking, [], {#budgetId: budgetId}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getBudgetTracking, [], {
#budgetId: budgetId,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAuditLogs({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAuditLogs({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
@@ -402,27 +347,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? limit,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAuditLogs,
[],
{
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
@@ -430,43 +355,55 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAnomalies({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAnomalies({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAnomalies,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAnomalies,
[],
{
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, String>> exportAuditLogs({
@@ -476,31 +413,25 @@ class MockFinanceWorkflowRepository extends _i1.Mock
String? format = 'csv',
}) =>
(super.noSuchMethod(
Invocation.method(
#exportAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(
#exportAuditLogs,
[],
{
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, String>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, String>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getWorkflowStats({
@@ -509,28 +440,22 @@ class MockFinanceWorkflowRepository extends _i1.Mock
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getWorkflowStats,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getWorkflowStats,
[],
{
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}

View File

@@ -33,13 +33,8 @@ import 'package:unionflow_mobile_apps/features/finance_workflow/domain/repositor
// ignore_for_file: invalid_use_of_internal_member
class _FakeEither_0<L, R> extends _i1.SmartFake implements _i2.Either<L, R> {
_FakeEither_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
_FakeEither_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
/// A class which mocks [FinanceWorkflowRepository].
@@ -53,104 +48,90 @@ class MockFinanceWorkflowRepository extends _i1.Mock
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getPendingApprovals({String? organizationId}) => (super.noSuchMethod(
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
getPendingApprovals({String? organizationId}) =>
(super.noSuchMethod(
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> getApprovalById(
String? approvalId) =>
String? approvalId,
) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalById,
[approvalId],
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#getApprovalById,
[approvalId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
Invocation.method(#getApprovalById, [approvalId]),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#getApprovalById, [approvalId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> approveTransaction({
required String? approvalId,
String? comment,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
approveTransaction({required String? approvalId, String? comment}) =>
(super.noSuchMethod(
Invocation.method(
#approveTransaction,
[],
{
#approvalId: approvalId,
#comment: comment,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#approveTransaction,
[],
{
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> rejectTransaction({
required String? approvalId,
required String? reason,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
rejectTransaction({required String? approvalId, required String? reason}) =>
(super.noSuchMethod(
Invocation.method(
#rejectTransaction,
[],
{
#approvalId: approvalId,
#reason: reason,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#rejectTransaction,
[],
{
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> requestApproval({
@@ -159,68 +140,60 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required double? amount,
}) =>
(super.noSuchMethod(
Invocation.method(
#requestApproval,
[],
{
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#requestApproval,
[],
{
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getApprovalsHistory({
getApprovalsHistory({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
_i6.ApprovalStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
(super.noSuchMethod(
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>> getBudgets({
@@ -229,48 +202,39 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? year,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgets,
[],
{
#organizationId: organizationId,
#status: status,
#year: year,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(
#getBudgets,
[],
{
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> getBudgetById(
String? budgetId) =>
String? budgetId,
) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetById,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#getBudgetById,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
Invocation.method(#getBudgetById, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#getBudgetById, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> createBudget({
@@ -283,26 +247,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required List<_i7.BudgetLine>? lines,
}) =>
(super.noSuchMethod(
Invocation.method(
#createBudget,
[],
{
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#createBudget,
[],
{
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
@@ -310,10 +255,23 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#year: year,
#month: month,
#lines: lines,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> updateBudget({
@@ -324,75 +282,62 @@ class MockFinanceWorkflowRepository extends _i1.Mock
_i7.BudgetStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateBudget,
[],
{
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#updateBudget,
[],
{
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, void>> deleteBudget(String? budgetId) =>
(super.noSuchMethod(
Invocation.method(
#deleteBudget,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(
#deleteBudget,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, void>>);
Invocation.method(#deleteBudget, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(#deleteBudget, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, void>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking(
{required String? budgetId}) =>
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking({
required String? budgetId,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
Invocation.method(#getBudgetTracking, [], {#budgetId: budgetId}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getBudgetTracking, [], {
#budgetId: budgetId,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAuditLogs({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAuditLogs({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
@@ -402,27 +347,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? limit,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAuditLogs,
[],
{
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
@@ -430,43 +355,55 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAnomalies({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAnomalies({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAnomalies,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAnomalies,
[],
{
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, String>> exportAuditLogs({
@@ -476,31 +413,25 @@ class MockFinanceWorkflowRepository extends _i1.Mock
String? format = 'csv',
}) =>
(super.noSuchMethod(
Invocation.method(
#exportAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(
#exportAuditLogs,
[],
{
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, String>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, String>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getWorkflowStats({
@@ -509,28 +440,22 @@ class MockFinanceWorkflowRepository extends _i1.Mock
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getWorkflowStats,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getWorkflowStats,
[],
{
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}

View File

@@ -33,13 +33,8 @@ import 'package:unionflow_mobile_apps/features/finance_workflow/domain/repositor
// ignore_for_file: invalid_use_of_internal_member
class _FakeEither_0<L, R> extends _i1.SmartFake implements _i2.Either<L, R> {
_FakeEither_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
_FakeEither_0(Object parent, Invocation parentInvocation)
: super(parent, parentInvocation);
}
/// A class which mocks [FinanceWorkflowRepository].
@@ -53,104 +48,90 @@ class MockFinanceWorkflowRepository extends _i1.Mock
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getPendingApprovals({String? organizationId}) => (super.noSuchMethod(
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getPendingApprovals,
[],
{#organizationId: organizationId},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
getPendingApprovals({String? organizationId}) =>
(super.noSuchMethod(
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getPendingApprovals, [], {
#organizationId: organizationId,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> getApprovalById(
String? approvalId) =>
String? approvalId,
) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalById,
[approvalId],
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#getApprovalById,
[approvalId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
Invocation.method(#getApprovalById, [approvalId]),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#getApprovalById, [approvalId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> approveTransaction({
required String? approvalId,
String? comment,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
approveTransaction({required String? approvalId, String? comment}) =>
(super.noSuchMethod(
Invocation.method(
#approveTransaction,
[],
{
#approvalId: approvalId,
#comment: comment,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#approveTransaction,
[],
{
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#approveTransaction, [], {
#approvalId: approvalId,
#comment: comment,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>> rejectTransaction({
required String? approvalId,
required String? reason,
}) =>
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>
rejectTransaction({required String? approvalId, required String? reason}) =>
(super.noSuchMethod(
Invocation.method(
#rejectTransaction,
[],
{
#approvalId: approvalId,
#reason: reason,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#rejectTransaction,
[],
{
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#rejectTransaction, [], {
#approvalId: approvalId,
#reason: reason,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>> requestApproval({
@@ -159,68 +140,60 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required double? amount,
}) =>
(super.noSuchMethod(
Invocation.method(
#requestApproval,
[],
{
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(
#requestApproval,
[],
{
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, _i6.TransactionApproval>
>.value(
_FakeEither_0<_i5.Failure, _i6.TransactionApproval>(
this,
Invocation.method(#requestApproval, [], {
#transactionId: transactionId,
#transactionType: transactionType,
#amount: amount,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i6.TransactionApproval>>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>
getApprovalsHistory({
getApprovalsHistory({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
_i6.ApprovalStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
returnValue: _i4.Future<
_i2
.Either<_i5.Failure, List<_i6.TransactionApproval>>>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(
#getApprovalsHistory,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
},
),
)),
) as _i4
.Future<_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>>);
(super.noSuchMethod(
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>.value(
_FakeEither_0<_i5.Failure, List<_i6.TransactionApproval>>(
this,
Invocation.method(#getApprovalsHistory, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#status: status,
}),
),
),
)
as _i4.Future<
_i2.Either<_i5.Failure, List<_i6.TransactionApproval>>
>);
@override
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>> getBudgets({
@@ -229,48 +202,39 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? year,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgets,
[],
{
#organizationId: organizationId,
#status: status,
#year: year,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(
#getBudgets,
[],
{
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>.value(
_FakeEither_0<_i5.Failure, List<_i7.Budget>>(
this,
Invocation.method(#getBudgets, [], {
#organizationId: organizationId,
#status: status,
#year: year,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i7.Budget>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> getBudgetById(
String? budgetId) =>
String? budgetId,
) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetById,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#getBudgetById,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
Invocation.method(#getBudgetById, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#getBudgetById, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> createBudget({
@@ -283,26 +247,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
required List<_i7.BudgetLine>? lines,
}) =>
(super.noSuchMethod(
Invocation.method(
#createBudget,
[],
{
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#createBudget,
[],
{
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
@@ -310,10 +255,23 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#year: year,
#month: month,
#lines: lines,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#createBudget, [], {
#name: name,
#description: description,
#organizationId: organizationId,
#period: period,
#year: year,
#month: month,
#lines: lines,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, _i7.Budget>> updateBudget({
@@ -324,75 +282,62 @@ class MockFinanceWorkflowRepository extends _i1.Mock
_i7.BudgetStatus? status,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateBudget,
[],
{
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(
#updateBudget,
[],
{
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>.value(
_FakeEither_0<_i5.Failure, _i7.Budget>(
this,
Invocation.method(#updateBudget, [], {
#budgetId: budgetId,
#name: name,
#description: description,
#lines: lines,
#status: status,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, _i7.Budget>>);
@override
_i4.Future<_i2.Either<_i5.Failure, void>> deleteBudget(String? budgetId) =>
(super.noSuchMethod(
Invocation.method(
#deleteBudget,
[budgetId],
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(
#deleteBudget,
[budgetId],
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, void>>);
Invocation.method(#deleteBudget, [budgetId]),
returnValue: _i4.Future<_i2.Either<_i5.Failure, void>>.value(
_FakeEither_0<_i5.Failure, void>(
this,
Invocation.method(#deleteBudget, [budgetId]),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, void>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking(
{required String? budgetId}) =>
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getBudgetTracking({
required String? budgetId,
}) =>
(super.noSuchMethod(
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getBudgetTracking,
[],
{#budgetId: budgetId},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
Invocation.method(#getBudgetTracking, [], {#budgetId: budgetId}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getBudgetTracking, [], {
#budgetId: budgetId,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAuditLogs({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAuditLogs({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
@@ -402,27 +347,7 @@ class MockFinanceWorkflowRepository extends _i1.Mock
int? limit,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAuditLogs,
[],
{
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
@@ -430,43 +355,55 @@ class MockFinanceWorkflowRepository extends _i1.Mock
#entityType: entityType,
#severity: severity,
#limit: limit,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#operation: operation,
#entityType: entityType,
#severity: severity,
#limit: limit,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>> getAnomalies({
_i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>
getAnomalies({
String? organizationId,
DateTime? startDate,
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getAnomalies,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue: _i4
.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(
#getAnomalies,
[],
{
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
}),
returnValue:
_i4.Future<
_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>
>.value(
_FakeEither_0<_i5.Failure, List<_i8.FinancialAuditLog>>(
this,
Invocation.method(#getAnomalies, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, List<_i8.FinancialAuditLog>>>);
@override
_i4.Future<_i2.Either<_i5.Failure, String>> exportAuditLogs({
@@ -476,31 +413,25 @@ class MockFinanceWorkflowRepository extends _i1.Mock
String? format = 'csv',
}) =>
(super.noSuchMethod(
Invocation.method(
#exportAuditLogs,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(
#exportAuditLogs,
[],
{
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, String>>);
}),
returnValue: _i4.Future<_i2.Either<_i5.Failure, String>>.value(
_FakeEither_0<_i5.Failure, String>(
this,
Invocation.method(#exportAuditLogs, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
#format: format,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, String>>);
@override
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>> getWorkflowStats({
@@ -509,28 +440,22 @@ class MockFinanceWorkflowRepository extends _i1.Mock
DateTime? endDate,
}) =>
(super.noSuchMethod(
Invocation.method(
#getWorkflowStats,
[],
{
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(
#getWorkflowStats,
[],
{
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
},
),
)),
) as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}),
returnValue:
_i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>.value(
_FakeEither_0<_i5.Failure, Map<String, dynamic>>(
this,
Invocation.method(#getWorkflowStats, [], {
#organizationId: organizationId,
#startDate: startDate,
#endDate: endDate,
}),
),
),
)
as _i4.Future<_i2.Either<_i5.Failure, Map<String, dynamic>>>);
}