Skip to content

Commit 9f3e2e7

Browse files
Fix Kotlin
1 parent 8d31c26 commit 9f3e2e7

File tree

1 file changed

+5
-4
lines changed
  • firebase-firestore/ktx/src/test/java/com/google/firebase/firestore/testutil

1 file changed

+5
-4
lines changed

firebase-firestore/ktx/src/test/java/com/google/firebase/firestore/testutil/TestUtil.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,22 +174,23 @@ public static SnapshotVersion version(long versionMicros) {
174174
}
175175

176176
public static Document doc(String key, long version, Map<String, Object> data) {
177-
return new Document(
177+
return Document.fromObjectValue(
178178
key(key), version(version), wrapObject(data), Document.DocumentState.SYNCED);
179179
}
180180

181181
public static Document doc(DocumentKey key, long version, Map<String, Object> data) {
182-
return new Document(key, version(version), wrapObject(data), Document.DocumentState.SYNCED);
182+
return Document.fromObjectValue(
183+
key, version(version), wrapObject(data), Document.DocumentState.SYNCED);
183184
}
184185

185186
public static Document doc(
186187
String key, long version, ObjectValue data, Document.DocumentState documentState) {
187-
return new Document(key(key), version(version), data, documentState);
188+
return Document.fromObjectValue(key(key), version(version), data, documentState);
188189
}
189190

190191
public static Document doc(
191192
String key, long version, Map<String, Object> data, Document.DocumentState documentState) {
192-
return new Document(key(key), version(version), wrapObject(data), documentState);
193+
return Document.fromObjectValue(key(key), version(version), wrapObject(data), documentState);
193194
}
194195

195196
public static NoDocument deletedDoc(String key, long version) {

0 commit comments

Comments
 (0)