@@ -170,10 +170,11 @@ - (void)testDoesNotRaiseEventsForMetadataChangesUnlessSpecified {
170
170
FSTDocument *doc1 = FSTTestDoc (@" rooms/Eros" , 1 , @{@" name" : @" Eros" }, NO );
171
171
FSTDocument *doc2 = FSTTestDoc (@" rooms/Hades" , 2 , @{@" name" : @" Hades" }, NO );
172
172
173
- FSTListenOptions *options = [[FSTListenOptions alloc ] initWithIncludeQueryMetadataChanges: YES
174
- includeDocumentMetadataChanges: NO
175
- waitForSyncWhenOnline: NO
176
- getOptions: [FIRGetOptions defaultOptions ]];
173
+ FSTListenOptions *options =
174
+ [[FSTListenOptions alloc ] initWithIncludeQueryMetadataChanges: YES
175
+ includeDocumentMetadataChanges: NO
176
+ waitForSyncWhenOnline: NO
177
+ getOptions: [FIRGetOptions defaultOptions ]];
177
178
178
179
FSTQueryListener *filteredListener =
179
180
[self listenToQuery: query accumulatingSnapshots: filteredAccum];
@@ -211,10 +212,11 @@ - (void)testRaisesDocumentMetadataEventsOnlyWhenSpecified {
211
212
FSTDocument *doc1Prime = FSTTestDoc (@" rooms/Eros" , 1 , @{@" name" : @" Eros" }, NO );
212
213
FSTDocument *doc3 = FSTTestDoc (@" rooms/Other" , 3 , @{@" name" : @" Other" }, NO );
213
214
214
- FSTListenOptions *options = [[FSTListenOptions alloc ] initWithIncludeQueryMetadataChanges: NO
215
- includeDocumentMetadataChanges: YES
216
- waitForSyncWhenOnline: NO
217
- getOptions: [FIRGetOptions defaultOptions ]];
215
+ FSTListenOptions *options =
216
+ [[FSTListenOptions alloc ] initWithIncludeQueryMetadataChanges: NO
217
+ includeDocumentMetadataChanges: YES
218
+ waitForSyncWhenOnline: NO
219
+ getOptions: [FIRGetOptions defaultOptions ]];
218
220
219
221
FSTQueryListener *filteredListener =
220
222
[self listenToQuery: query accumulatingSnapshots: filteredAccum];
@@ -262,10 +264,11 @@ - (void)testRaisesQueryMetadataEventsOnlyWhenHasPendingWritesOnTheQueryChanges {
262
264
FSTDocument *doc2Prime = FSTTestDoc (@" rooms/Hades" , 2 , @{@" name" : @" Hades" }, NO );
263
265
FSTDocument *doc3 = FSTTestDoc (@" rooms/Other" , 3 , @{@" name" : @" Other" }, NO );
264
266
265
- FSTListenOptions *options = [[FSTListenOptions alloc ] initWithIncludeQueryMetadataChanges: YES
266
- includeDocumentMetadataChanges: NO
267
- waitForSyncWhenOnline: NO
268
- getOptions: [FIRGetOptions defaultOptions ]];
267
+ FSTListenOptions *options =
268
+ [[FSTListenOptions alloc ] initWithIncludeQueryMetadataChanges: YES
269
+ includeDocumentMetadataChanges: NO
270
+ waitForSyncWhenOnline: NO
271
+ getOptions: [FIRGetOptions defaultOptions ]];
269
272
270
273
FSTQueryListener *fullListener =
271
274
[self listenToQuery: query options: options accumulatingSnapshots: fullAccum];
@@ -329,14 +332,15 @@ - (void)testWillWaitForSyncIfOnline {
329
332
FSTQuery *query = FSTTestQuery (@" rooms" );
330
333
FSTDocument *doc1 = FSTTestDoc (@" rooms/Eros" , 1 , @{@" name" : @" Eros" }, NO );
331
334
FSTDocument *doc2 = FSTTestDoc (@" rooms/Hades" , 2 , @{@" name" : @" Hades" }, NO );
332
- FSTQueryListener *listener =
333
- [self listenToQuery: query
334
- options: [[FSTListenOptions alloc ] initWithIncludeQueryMetadataChanges: NO
335
- includeDocumentMetadataChanges: NO
336
- waitForSyncWhenOnline: YES
337
- getOptions: [FIRGetOptions defaultOptions ]]
335
+ FSTQueryListener *listener = [self
336
+ listenToQuery: query
337
+ options: [[FSTListenOptions alloc ]
338
+ initWithIncludeQueryMetadataChanges: NO
339
+ includeDocumentMetadataChanges: NO
340
+ waitForSyncWhenOnline: YES
341
+ getOptions: [FIRGetOptions defaultOptions ]]
338
342
339
- accumulatingSnapshots: events];
343
+ accumulatingSnapshots: events];
340
344
341
345
FSTView *view = [[FSTView alloc ] initWithQuery: query remoteDocuments: [FSTDocumentKeySet keySet ]];
342
346
FSTViewSnapshot *snap1 = FSTTestApplyChanges (view, @[ doc1 ], nil );
@@ -374,14 +378,15 @@ - (void)testWillRaiseInitialEventWhenGoingOffline {
374
378
FSTQuery *query = FSTTestQuery (@" rooms" );
375
379
FSTDocument *doc1 = FSTTestDoc (@" rooms/Eros" , 1 , @{@" name" : @" Eros" }, NO );
376
380
FSTDocument *doc2 = FSTTestDoc (@" rooms/Hades" , 2 , @{@" name" : @" Hades" }, NO );
377
- FSTQueryListener *listener =
378
- [self listenToQuery: query
379
- options: [[FSTListenOptions alloc ] initWithIncludeQueryMetadataChanges: NO
380
- includeDocumentMetadataChanges: NO
381
- waitForSyncWhenOnline: YES
382
- getOptions: [FIRGetOptions defaultOptions ]]
383
-
384
- accumulatingSnapshots: events];
381
+ FSTQueryListener *listener = [self
382
+ listenToQuery: query
383
+ options: [[FSTListenOptions alloc ]
384
+ initWithIncludeQueryMetadataChanges: NO
385
+ includeDocumentMetadataChanges: NO
386
+ waitForSyncWhenOnline: YES
387
+ getOptions: [FIRGetOptions defaultOptions ]]
388
+
389
+ accumulatingSnapshots: events];
385
390
386
391
FSTView *view = [[FSTView alloc ] initWithQuery: query remoteDocuments: [FSTDocumentKeySet keySet ]];
387
392
FSTViewSnapshot *snap1 = FSTTestApplyChanges (view, @[ doc1 ], nil );
0 commit comments