use of com.google.firebase.FirebaseApp in project FirebaseUI-Android by firebase.
the class FirebaseArrayOfObjectsTest method setUp.
@Before
public void setUp() throws Exception {
FirebaseApp app = getAppInstance(InstrumentationRegistry.getContext());
mRef = FirebaseDatabase.getInstance(app).getReference().child("firebasearray").child("objects");
mArray = new FirebaseArray(mRef);
mRef.removeValue();
runAndWaitUntil(mArray, new Runnable() {
@Override
public void run() {
for (int i = 1; i <= INITIAL_SIZE; i++) {
mRef.push().setValue(new Bean(i, "Text " + i, i % 2 == 0), i);
}
}
}, new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
return mArray.getCount() == INITIAL_SIZE;
}
});
}
use of com.google.firebase.FirebaseApp in project FirebaseUI-Android by firebase.
the class FirebaseArrayTest method setUp.
@Before
public void setUp() throws Exception {
FirebaseApp app = getAppInstance(InstrumentationRegistry.getContext());
mRef = FirebaseDatabase.getInstance(app).getReference().child("firebasearray");
mArray = new FirebaseArray(mRef);
mRef.removeValue();
runAndWaitUntil(mArray, new Runnable() {
@Override
public void run() {
for (int i = 1; i <= INITIAL_SIZE; i++) {
mRef.push().setValue(i, i);
}
}
}, new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
return mArray.getCount() == INITIAL_SIZE;
}
});
}
Aggregations