36
36
#include " Firestore/core/test/firebase/firestore/testutil/testutil.h"
37
37
38
38
namespace testutil = firebase::firestore::testutil;
39
+ using firebase::Timestamp;
39
40
using firebase::firestore::auth::User;
40
41
using firebase::firestore::model::DocumentKey;
41
42
using firebase::firestore::model::DocumentKeySet;
@@ -201,7 +202,7 @@ - (void)testAllMutationBatchesAffectingDocumentKey {
201
202
NSMutableArray <FSTMutationBatch *> *batches = [NSMutableArray array ];
202
203
for (FSTMutation *mutation in mutations) {
203
204
FSTMutationBatch *batch =
204
- self.mutationQueue ->AddMutationBatch ([FIRTimestamp timestamp ] , {}, {mutation});
205
+ self.mutationQueue ->AddMutationBatch (Timestamp::Now () , {}, {mutation});
205
206
[batches addObject: batch];
206
207
}
207
208
@@ -228,7 +229,7 @@ - (void)testAllMutationBatchesAffectingDocumentKeys {
228
229
NSMutableArray <FSTMutationBatch *> *batches = [NSMutableArray array ];
229
230
for (FSTMutation *mutation in mutations) {
230
231
FSTMutationBatch *batch =
231
- self.mutationQueue ->AddMutationBatch ([FIRTimestamp timestamp ] , {}, {mutation});
232
+ self.mutationQueue ->AddMutationBatch (Timestamp::Now () , {}, {mutation});
232
233
[batches addObject: batch];
233
234
}
234
235
@@ -254,16 +255,16 @@ - (void)testAllMutationBatchesAffectingDocumentKeys_handlesOverlap {
254
255
FSTTestSetMutation (@" foo/baz" , @{@" a" : @1 }),
255
256
};
256
257
FSTMutationBatch *batch1 =
257
- self.mutationQueue ->AddMutationBatch ([FIRTimestamp timestamp ] , {}, std::move (group1));
258
+ self.mutationQueue ->AddMutationBatch (Timestamp::Now () , {}, std::move (group1));
258
259
259
260
std::vector<FSTMutation *> group2 = {FSTTestSetMutation (@" food/bar" , @{@" a" : @1 })};
260
- self.mutationQueue ->AddMutationBatch ([FIRTimestamp timestamp ] , {}, std::move (group2));
261
+ self.mutationQueue ->AddMutationBatch (Timestamp::Now () , {}, std::move (group2));
261
262
262
263
std::vector<FSTMutation *> group3 = {
263
264
FSTTestSetMutation (@" foo/bar" , @{@" b" : @1 }),
264
265
};
265
266
FSTMutationBatch *batch3 =
266
- self.mutationQueue ->AddMutationBatch ([FIRTimestamp timestamp ] , {}, std::move (group3));
267
+ self.mutationQueue ->AddMutationBatch (Timestamp::Now () , {}, std::move (group3));
267
268
268
269
DocumentKeySet keys{
269
270
Key (" foo/bar" ),
@@ -293,7 +294,7 @@ - (void)testAllMutationBatchesAffectingQuery {
293
294
NSMutableArray <FSTMutationBatch *> *batches = [NSMutableArray array ];
294
295
for (FSTMutation *mutation in mutations) {
295
296
FSTMutationBatch *batch =
296
- self.mutationQueue ->AddMutationBatch ([FIRTimestamp timestamp ] , {}, {mutation});
297
+ self.mutationQueue ->AddMutationBatch (Timestamp::Now () , {}, {mutation});
297
298
[batches addObject: batch];
298
299
}
299
300
@@ -396,8 +397,7 @@ - (FSTMutationBatch *)addMutationBatch {
396
397
- (FSTMutationBatch *)addMutationBatchWithKey : (NSString *)key {
397
398
FSTSetMutation *mutation = FSTTestSetMutation (key, @{@" a" : @1 });
398
399
399
- FSTMutationBatch *batch =
400
- self.mutationQueue ->AddMutationBatch ([FIRTimestamp timestamp ], {}, {mutation});
400
+ FSTMutationBatch *batch = self.mutationQueue ->AddMutationBatch (Timestamp::Now (), {}, {mutation});
401
401
return batch;
402
402
}
403
403
0 commit comments