@Test public void testDataChanges_onCancelled() { TestObserver<DataSnapshot> sub = TestObserver.create(); RxFirebaseDatabase.dataChanges(mockDatabaseReference).subscribe(sub); verifyAddValueEventListener(); callValueEventOnCancelled(new DatabaseException("foo")); sub.assertError(DatabaseException.class); sub.assertNoValues(); sub.dispose(); callValueEventOnCancelled(new DatabaseException("foo")); assertThat(sub.errorCount()).isEqualTo(1); }
@NonNull @CheckResult public static Observable<DataSnapshot> dataChanges( @NonNull DatabaseReference ref) { return Observable.create(new DataChangesOnSubscribe(ref)); }
RxFirebaseDatabase { @NonNull @CheckResult public static Observable<DataSnapshot> dataChanges( @NonNull DatabaseReference ref) { return Observable.create(new DataChangesOnSubscribe(ref)); } }
RxFirebaseDatabase { @NonNull @CheckResult public static Observable<DataSnapshot> dataChanges( @NonNull DatabaseReference ref) { return Observable.create(new DataChangesOnSubscribe(ref)); } private  RxFirebaseDatabase(); }
RxFirebaseDatabase { @NonNull @CheckResult public static Observable<DataSnapshot> dataChanges( @NonNull DatabaseReference ref) { return Observable.create(new DataChangesOnSubscribe(ref)); } private  RxFirebaseDatabase(); @NonNull @CheckResult static Observable<ChildEvent> childEvents(
      @NonNull DatabaseReference ref); @NonNull @CheckResult static Single<DataSnapshot> data(@NonNull DatabaseReference ref); @NonNull @CheckResult static Observable<DataSnapshot> dataChanges(
      @NonNull DatabaseReference ref); @NonNull @CheckResult static Observable<Optional<T>> dataChangesOf(
      @NonNull DatabaseReference ref, @NonNull Class<T> clazz); @NonNull @CheckResult static Observable<Optional<T>> dataChangesOf(
      @NonNull DatabaseReference ref, @NonNull GenericTypeIndicator<T> typeIndicator); @NonNull @CheckResult static Single<Optional<T>> dataOf(@NonNull DatabaseReference ref,
      @NonNull Class<T> clazz); @NonNull @CheckResult static Single<Optional<T>> dataOf(@NonNull DatabaseReference ref,
      @NonNull GenericTypeIndicator<T> typeIndicator); @NonNull @CheckResult static Completable removeValue(@NonNull DatabaseReference ref); @NonNull @CheckResult static Completable setPriority(@NonNull DatabaseReference ref,
      @NonNull Object priority); @NonNull @CheckResult static Completable setValue(@NonNull DatabaseReference ref,
      @Nullable T value); @NonNull @CheckResult static Completable setValue(@NonNull DatabaseReference ref,
      @Nullable T value, @NonNull Object priority); @NonNull @CheckResult static Completable runTransaction(@NonNull DatabaseReference ref,
      @NonNull Function<MutableData, Transaction.Result> task); @NonNull @CheckResult static Completable runTransaction(@NonNull DatabaseReference ref,
      boolean fireLocalEvents, @NonNull Function<MutableData, Transaction.Result> task); @NonNull @CheckResult static Completable updateChildren(@NonNull DatabaseReference ref,
      @NonNull Map<String, Object> update); }
RxFirebaseDatabase { @NonNull @CheckResult public static Observable<DataSnapshot> dataChanges( @NonNull DatabaseReference ref) { return Observable.create(new DataChangesOnSubscribe(ref)); } private  RxFirebaseDatabase(); @NonNull @CheckResult static Observable<ChildEvent> childEvents(
      @NonNull DatabaseReference ref); @NonNull @CheckResult static Single<DataSnapshot> data(@NonNull DatabaseReference ref); @NonNull @CheckResult static Observable<DataSnapshot> dataChanges(
      @NonNull DatabaseReference ref); @NonNull @CheckResult static Observable<Optional<T>> dataChangesOf(
      @NonNull DatabaseReference ref, @NonNull Class<T> clazz); @NonNull @CheckResult static Observable<Optional<T>> dataChangesOf(
      @NonNull DatabaseReference ref, @NonNull GenericTypeIndicator<T> typeIndicator); @NonNull @CheckResult static Single<Optional<T>> dataOf(@NonNull DatabaseReference ref,
      @NonNull Class<T> clazz); @NonNull @CheckResult static Single<Optional<T>> dataOf(@NonNull DatabaseReference ref,
      @NonNull GenericTypeIndicator<T> typeIndicator); @NonNull @CheckResult static Completable removeValue(@NonNull DatabaseReference ref); @NonNull @CheckResult static Completable setPriority(@NonNull DatabaseReference ref,
      @NonNull Object priority); @NonNull @CheckResult static Completable setValue(@NonNull DatabaseReference ref,
      @Nullable T value); @NonNull @CheckResult static Completable setValue(@NonNull DatabaseReference ref,
      @Nullable T value, @NonNull Object priority); @NonNull @CheckResult static Completable runTransaction(@NonNull DatabaseReference ref,
      @NonNull Function<MutableData, Transaction.Result> task); @NonNull @CheckResult static Completable runTransaction(@NonNull DatabaseReference ref,
      boolean fireLocalEvents, @NonNull Function<MutableData, Transaction.Result> task); @NonNull @CheckResult static Completable updateChildren(@NonNull DatabaseReference ref,
      @NonNull Map<String, Object> update);  }