Files
eatvio_app/test/fixtures/doubles/create_plan_doubles.dart
2025-11-20 16:58:56 +03:00

23 lines
792 B
Dart

import 'package:dio/dio.dart';
import 'package:eatvio_app/features/create_plan/repositories/create_plan_repository.dart';
import 'package:eatvio_app/features/create_plan/services/create_plan_service.dart';
class FixtureCreatePlanRepository extends CreatePlanRepository {
FixtureCreatePlanRepository() : super(createPlanService: _NoopCreatePlanService());
final List<Map<String, dynamic>> createPlanRequests = <Map<String, dynamic>>[];
@override
Future<void> createPlan({required Map<String, dynamic> model}) async {
createPlanRequests.add(Map<String, dynamic>.from(model));
}
}
class _NoopCreatePlanService implements CreatePlanService {
@override
Future<void> createPlan({required FormData formData}) {
throw UnimplementedError('Not used in fixture tests');
}
}