Skip to content

Commit 8f00bad

Browse files
Removed unused TestHelper methods (#650)
1 parent 69f29d4 commit 8f00bad

File tree

3 files changed

+0
-579
lines changed

3 files changed

+0
-579
lines changed

firebase-firestore/ktx/src/test/java/com/google/firebase/firestore/TestAccessHelper.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,17 @@
1919
import static com.google.firebase.firestore.testutil.TestUtil.key;
2020
import static org.mockito.Mockito.mock;
2121

22-
import com.google.android.gms.tasks.Task;
2322
import com.google.firebase.database.collection.ImmutableSortedSet;
2423
import com.google.firebase.firestore.core.DocumentViewChange;
2524
import com.google.firebase.firestore.core.DocumentViewChange.Type;
2625
import com.google.firebase.firestore.core.ViewSnapshot;
2726
import com.google.firebase.firestore.model.Document;
2827
import com.google.firebase.firestore.model.DocumentKey;
2928
import com.google.firebase.firestore.model.DocumentSet;
30-
import com.google.firebase.firestore.model.ResourcePath;
3129
import com.google.firebase.firestore.model.value.ObjectValue;
3230
import java.util.ArrayList;
3331
import java.util.List;
3432
import java.util.Map;
35-
import org.junit.Assert;
36-
import org.robolectric.Robolectric;
3733

3834
public class TestUtil {
3935

@@ -43,14 +39,6 @@ public static FirebaseFirestore firestore() {
4339
return FIRESTORE;
4440
}
4541

46-
public static CollectionReference collectionReference(String path) {
47-
return new CollectionReference(ResourcePath.fromString(path), FIRESTORE);
48-
}
49-
50-
public static DocumentReference documentReference(String path) {
51-
return new DocumentReference(key(path), FIRESTORE);
52-
}
53-
5442
public static DocumentSnapshot documentSnapshot(
5543
String path, Map<String, Object> data, boolean isFromCache) {
5644
if (data == null) {
@@ -133,13 +121,4 @@ public static QuerySnapshot querySnapshot(
133121
/* excludesMetadataChanges= */ false);
134122
return new QuerySnapshot(query(path), viewSnapshot, FIRESTORE);
135123
}
136-
137-
public static <T> T waitFor(Task<T> task) {
138-
if (!task.isComplete()) {
139-
Robolectric.flushBackgroundThreadScheduler();
140-
}
141-
Assert.assertTrue(
142-
"Expected task to be completed after background thread flush", task.isComplete());
143-
return task.getResult();
144-
}
145124
}

0 commit comments

Comments
 (0)