@Test public void testSignInWithEmailAndPassword() { mockSuccessfulAuthResult(); when(mockFirebaseAuth.signInWithEmailAndPassword("email", "password")).thenReturn( mockAuthResultTask); TestObserver<FirebaseUser> obs = TestObserver.create(); RxFirebaseAuth.signInWithEmailAndPassword(mockFirebaseAuth, "email", "password").subscribe(obs); callOnComplete(mockAuthResultTask); obs.dispose(); callOnComplete(mockAuthResultTask); obs.assertNoErrors(); obs.assertComplete(); obs.assertValueCount(1); }
@CheckResult @NonNull public static Single<FirebaseUser> signInWithEmailAndPassword( @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password) { return Single.create(new SignInWithEmailAndPasswordOnSubscribe(instance, email, password)); }
RxFirebaseAuth { @CheckResult @NonNull public static Single<FirebaseUser> signInWithEmailAndPassword( @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password) { return Single.create(new SignInWithEmailAndPasswordOnSubscribe(instance, email, password)); } }
RxFirebaseAuth { @CheckResult @NonNull public static Single<FirebaseUser> signInWithEmailAndPassword( @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password) { return Single.create(new SignInWithEmailAndPasswordOnSubscribe(instance, email, password)); } private  RxFirebaseAuth(); }
RxFirebaseAuth { @CheckResult @NonNull public static Single<FirebaseUser> signInWithEmailAndPassword( @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password) { return Single.create(new SignInWithEmailAndPasswordOnSubscribe(instance, email, password)); } private  RxFirebaseAuth(); @CheckResult @NonNull static Observable<FirebaseAuth> authStateChanges(
      @NonNull FirebaseAuth instance); @CheckResult @NonNull static Single<FirebaseUser> createUserWithEmailAndPassword(
      @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password); @CheckResult @NonNull static Maybe<List<String>> fetchProvidersForEmail(
      @NonNull FirebaseAuth instance, @NonNull String email); @CheckResult @NonNull static Maybe<FirebaseUser> getCurrentUser(
      @NonNull final FirebaseAuth instance); @CheckResult @NonNull static Completable sendPasswordResetEmail(
      @NonNull FirebaseAuth instance, @NonNull String email); @CheckResult @NonNull static Single<FirebaseUser> signInAnonymously(
      @NonNull FirebaseAuth instance); @CheckResult @NonNull static Single<FirebaseUser> signInWithCredential(
      @NonNull FirebaseAuth instance, @NonNull AuthCredential credential); @CheckResult @NonNull static Single<FirebaseUser> signInWithCustomToken(
      @NonNull FirebaseAuth instance, @NonNull String token); @CheckResult @NonNull static Single<FirebaseUser> signInWithEmailAndPassword(
      @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password); @CheckResult @NonNull static Completable signOut(@NonNull FirebaseAuth instance); @CheckResult @NonNull static Completable applyActionCode(@NonNull FirebaseAuth instance,
      @NonNull String code); @CheckResult @NonNull static Single<ActionCodeResult> checkActionCode(
      @NonNull FirebaseAuth instance, @NonNull String code); @CheckResult @NonNull static Completable confirmPasswordReset(
      @NonNull FirebaseAuth instance, @NonNull String code, @NonNull String newPassword); @CheckResult @NonNull static Single<String> verifyPasswordResetCode(
      @NonNull FirebaseAuth instance, @NonNull String code); }
RxFirebaseAuth { @CheckResult @NonNull public static Single<FirebaseUser> signInWithEmailAndPassword( @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password) { return Single.create(new SignInWithEmailAndPasswordOnSubscribe(instance, email, password)); } private  RxFirebaseAuth(); @CheckResult @NonNull static Observable<FirebaseAuth> authStateChanges(
      @NonNull FirebaseAuth instance); @CheckResult @NonNull static Single<FirebaseUser> createUserWithEmailAndPassword(
      @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password); @CheckResult @NonNull static Maybe<List<String>> fetchProvidersForEmail(
      @NonNull FirebaseAuth instance, @NonNull String email); @CheckResult @NonNull static Maybe<FirebaseUser> getCurrentUser(
      @NonNull final FirebaseAuth instance); @CheckResult @NonNull static Completable sendPasswordResetEmail(
      @NonNull FirebaseAuth instance, @NonNull String email); @CheckResult @NonNull static Single<FirebaseUser> signInAnonymously(
      @NonNull FirebaseAuth instance); @CheckResult @NonNull static Single<FirebaseUser> signInWithCredential(
      @NonNull FirebaseAuth instance, @NonNull AuthCredential credential); @CheckResult @NonNull static Single<FirebaseUser> signInWithCustomToken(
      @NonNull FirebaseAuth instance, @NonNull String token); @CheckResult @NonNull static Single<FirebaseUser> signInWithEmailAndPassword(
      @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password); @CheckResult @NonNull static Completable signOut(@NonNull FirebaseAuth instance); @CheckResult @NonNull static Completable applyActionCode(@NonNull FirebaseAuth instance,
      @NonNull String code); @CheckResult @NonNull static Single<ActionCodeResult> checkActionCode(
      @NonNull FirebaseAuth instance, @NonNull String code); @CheckResult @NonNull static Completable confirmPasswordReset(
      @NonNull FirebaseAuth instance, @NonNull String code, @NonNull String newPassword); @CheckResult @NonNull static Single<String> verifyPasswordResetCode(
      @NonNull FirebaseAuth instance, @NonNull String code);  }