use of com.google.firebase.Timestamp in project firebase-android-sdk by firebase.
the class MutationTest method verifyOverlayRoundTrips.
private void verifyOverlayRoundTrips(MutableDocument doc, Mutation... mutations) {
MutableDocument docForMutations = doc.mutableCopy();
MutableDocument docForOverlay = doc.mutableCopy();
Timestamp now = Timestamp.now();
FieldMask mask = null;
for (Mutation m : mutations) {
mask = m.applyToLocalView(docForMutations, mask, now);
}
Mutation overlay = calculateOverlayMutation(docForMutations, mask);
if (overlay != null) {
overlay.applyToLocalView(docForOverlay, /* previousMask= */
null, now);
}
assertEquals(getDescription(doc, Arrays.asList(mutations), overlay), docForOverlay, docForMutations);
}
Aggregations