@@ -10,11 +10,11 @@ import 'package:shelf/shelf.dart';
10
10
import 'package:shelf_router/shelf_router.dart' ;
11
11
import 'package:test/test.dart' ;
12
12
13
- import '../bucket_storage_test.dart' ;
14
13
import '../server/sync_server/in_memory_sync_server.dart' ;
15
14
import '../utils/abstract_test_utils.dart' ;
16
15
import '../utils/in_memory_http.dart' ;
17
16
import '../utils/test_utils_impl.dart' ;
17
+ import 'utils.dart' ;
18
18
19
19
void main () {
20
20
_declareTests (
@@ -968,51 +968,3 @@ void _declareTests(String name, SyncOptions options, bool bson) {
968
968
});
969
969
});
970
970
}
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