@@ -10,11 +10,11 @@ import 'package:shelf/shelf.dart';
1010import 'package:shelf_router/shelf_router.dart' ;
1111import 'package:test/test.dart' ;
1212
13- import '../bucket_storage_test.dart' ;
1413import '../server/sync_server/in_memory_sync_server.dart' ;
1514import '../utils/abstract_test_utils.dart' ;
1615import '../utils/in_memory_http.dart' ;
1716import '../utils/test_utils_impl.dart' ;
17+ import 'utils.dart' ;
1818
1919void main () {
2020 _declareTests (
@@ -968,51 +968,3 @@ void _declareTests(String name, SyncOptions options, bool bson) {
968968 });
969969 });
970970}
971-
972- TypeMatcher <SyncStatus > isSyncStatus ({
973- Object ? downloading,
974- Object ? connected,
975- Object ? connecting,
976- Object ? hasSynced,
977- Object ? downloadProgress,
978- }) {
979- var matcher = isA <SyncStatus >();
980- if (downloading != null ) {
981- matcher = matcher.having ((e) => e.downloading, 'downloading' , downloading);
982- }
983- if (connected != null ) {
984- matcher = matcher.having ((e) => e.connected, 'connected' , connected);
985- }
986- if (connecting != null ) {
987- matcher = matcher.having ((e) => e.connecting, 'connecting' , connecting);
988- }
989- if (hasSynced != null ) {
990- matcher = matcher.having ((e) => e.hasSynced, 'hasSynced' , hasSynced);
991- }
992- if (downloadProgress != null ) {
993- matcher = matcher.having (
994- (e) => e.downloadProgress, 'downloadProgress' , downloadProgress);
995- }
996-
997- return matcher;
998- }
999-
1000- TypeMatcher <SyncDownloadProgress > isSyncDownloadProgress ({
1001- required Object progress,
1002- Map <BucketPriority , Object > priorities = const {},
1003- }) {
1004- var matcher =
1005- isA <SyncDownloadProgress >().having ((e) => e, 'untilCompletion' , progress);
1006- priorities.forEach ((priority, expected) {
1007- matcher = matcher.having (
1008- (e) => e.untilPriority (priority), 'untilPriority($priority )' , expected);
1009- });
1010-
1011- return matcher;
1012- }
1013-
1014- TypeMatcher <ProgressWithOperations > progress (int completed, int total) {
1015- return isA <ProgressWithOperations >()
1016- .having ((e) => e.downloadedOperations, 'completed' , completed)
1017- .having ((e) => e.totalOperations, 'total' , total);
1018- }
0 commit comments