Skip to content

Commit 61c69b3

Browse files
committed
rename getDoc and getDocs function
1 parent 539f548 commit 61c69b3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

firebase-firestore/src/androidTest/java/com/google/firebase/firestore/testutil/CompositeIndexTestHelper.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,18 @@ public Task<Void> deleteDoc(@NonNull DocumentReference document) {
158158
return document.delete();
159159
}
160160

161-
// Retrieves a single document from Firestore with test-specific fields removed.
161+
// Retrieve a single document from Firestore with test-specific fields removed.
162+
// TODO(composite-index-testing) Return sanitized DocumentSnapshot instead of its data.
162163
@NonNull
163-
public Map<String, Object> getDoc(@NonNull DocumentReference document) {
164+
public Map<String, Object> getSanitizedDocumentData(@NonNull DocumentReference document) {
164165
DocumentSnapshot docSnapshot = waitFor(document.get());
165166
return removeTestSpecificFieldsFromDoc(docSnapshot.getData());
166167
}
167168

168-
// Retrieves multiple documents from Firestore with test-specific fields removed.
169+
// Retrieve multiple documents from Firestore with test-specific fields removed.
170+
// TODO(composite-index-testing) Return sanitized QuerySnapshot instead of its data.
169171
@NonNull
170-
public List<Map<String, Object>> getDocs(@NonNull Query query_) {
172+
public List<Map<String, Object>> getSanitizedQueryData(@NonNull Query query_) {
171173
QuerySnapshot querySnapshot = waitFor(query(query_).get());
172174
List<Map<String, Object>> res = new ArrayList<>();
173175
for (DocumentSnapshot doc : querySnapshot) {

0 commit comments

Comments
 (0)