@Test public void testChildEvents_add() { TestObserver<ChildEvent> sub = TestObserver.create(); RxFirebaseDatabase.childEvents(mockDatabaseReference).subscribe(sub); verifyAddChildEventListener(); callOnChildAdded("foo"); callOnChildAdded("foo"); sub.assertNotComplete(); sub.assertNoErrors(); sub.assertValueCount(2); List events = sub.getEvents().get(0); for (Object event : events) { assertThat(event).isInstanceOf(ChildEvent.class); assertThat(event).isInstanceOf(ChildAddEvent.class); assertThat(((ChildAddEvent) event).previousChildName()).isEqualTo("foo"); } sub.dispose(); callOnChildAdded("baz"); sub.assertValueCount(2); }
@NonNull @CheckResult public static Observable<ChildEvent> childEvents( @NonNull DatabaseReference ref) { return Observable.create(new ChildEventsOnSubscribe(ref)); }
RxFirebaseDatabase { @NonNull @CheckResult public static Observable<ChildEvent> childEvents( @NonNull DatabaseReference ref) { return Observable.create(new ChildEventsOnSubscribe(ref)); } }
RxFirebaseDatabase { @NonNull @CheckResult public static Observable<ChildEvent> childEvents( @NonNull DatabaseReference ref) { return Observable.create(new ChildEventsOnSubscribe(ref)); } private  RxFirebaseDatabase(); }
RxFirebaseDatabase { @NonNull @CheckResult public static Observable<ChildEvent> childEvents( @NonNull DatabaseReference ref) { return Observable.create(new ChildEventsOnSubscribe(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<ChildEvent> childEvents( @NonNull DatabaseReference ref) { return Observable.create(new ChildEventsOnSubscribe(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);  }