Search in sources :

Example 1 with MockDatastore

use of com.google.firebase.firestore.remote.MockDatastore in project firebase-android-sdk by firebase.

the class SpecTestCase method initClient.

/**
 * Sets up a new client. Is used to initially setup the client initially and after every restart.
 */
private void initClient() {
    queue = new AsyncQueue();
    datastore = new MockDatastore(databaseInfo, queue, ApplicationProvider.getApplicationContext());
    ComponentProvider.Configuration configuration = new ComponentProvider.Configuration(ApplicationProvider.getApplicationContext(), queue, databaseInfo, datastore, currentUser, maxConcurrentLimboResolutions, new FirebaseFirestoreSettings.Builder().build());
    ComponentProvider provider = initializeComponentProvider(configuration, garbageCollectionEnabled);
    localPersistence = provider.getPersistence();
    remoteStore = provider.getRemoteStore();
    syncEngine = provider.getSyncEngine();
    eventManager = provider.getEventManager();
}
Also used : ComponentProvider(com.google.firebase.firestore.core.ComponentProvider) MockDatastore(com.google.firebase.firestore.remote.MockDatastore) AsyncQueue(com.google.firebase.firestore.util.AsyncQueue)

Aggregations

ComponentProvider (com.google.firebase.firestore.core.ComponentProvider)1 MockDatastore (com.google.firebase.firestore.remote.MockDatastore)1 AsyncQueue (com.google.firebase.firestore.util.AsyncQueue)1