mirror of
https://github.com/openfoodfacts/smooth-app.git
synced 2025-08-06 18:25:11 +08:00

* Nutritional values: ensure only one decimal separator is displayed * Add an assert * Some tests for StringExtensions * More tests * Better support multiple separators
52 lines
1.2 KiB
Dart
52 lines
1.2 KiB
Dart
import 'dart:io';
|
|
|
|
import 'package:mockito/mockito.dart';
|
|
import 'package:path_provider_platform_interface/path_provider_platform_interface.dart';
|
|
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
|
|
|
|
class MockedPathProviderPlatform extends Mock
|
|
with MockPlatformInterfaceMixin
|
|
implements PathProviderPlatform {
|
|
@override
|
|
Future<String?> getTemporaryPath() async {
|
|
return Directory.systemTemp.path;
|
|
}
|
|
|
|
@override
|
|
Future<String?> getApplicationSupportPath() async {
|
|
return Directory.systemTemp.path;
|
|
}
|
|
|
|
@override
|
|
Future<String?> getLibraryPath() async {
|
|
return Directory.systemTemp.path;
|
|
}
|
|
|
|
@override
|
|
Future<String?> getApplicationDocumentsPath() async {
|
|
return Directory.systemTemp.path;
|
|
}
|
|
|
|
@override
|
|
Future<String?> getExternalStoragePath() async {
|
|
return Directory.systemTemp.path;
|
|
}
|
|
|
|
@override
|
|
Future<List<String>?> getExternalCachePaths() async {
|
|
return <String>[Directory.systemTemp.path];
|
|
}
|
|
|
|
@override
|
|
Future<List<String>?> getExternalStoragePaths({
|
|
StorageDirectory? type,
|
|
}) async {
|
|
return <String>[Directory.systemTemp.path];
|
|
}
|
|
|
|
@override
|
|
Future<String?> getDownloadsPath() async {
|
|
return Directory.systemTemp.path;
|
|
}
|
|
}
|