Port Test for increment with merge
Ports tests from
@@ -95,6 +95,14 @@ public class NumericTransformsTest {
expectLocalAndRemoteValue(1337L);
}
+ @Test
+ public void mergeOnExistingDocumentWithIncrement() {
+ waitFor(docRef.set(map("sum", 1)));
+ expectLocalAndRemoteValue(1);
+ waitFor(docRef.set(map("sum", FieldValue.increment(1337)), SetOptions.merge()));
+ expectLocalAndRemoteValue(1338L);
+ }
+
@Test
public void integerIncrementWithExistingInteger() {
writeInitialData(map("sum", 1337L));
